Restore "Add VlantagApi Functional Component"" 57/61857/2
authorTimoney, Dan (dt5972) <dt5972@att.com>
Wed, 22 Aug 2018 14:46:23 +0000 (10:46 -0400)
committerTimoney, Dan (dt5972) <dt5972@att.com>
Wed, 22 Aug 2018 15:13:47 +0000 (11:13 -0400)
This reverts previous revert for VlantagApi functional
component, with correction to pom.xml which had
prevented jUnit tests from being counted.

Change-Id: I8cff5d04949fe8e110565fb7f68f939caba2eff8
Signed-off-by: Timoney, Dan (dt5972) <dt5972@att.com>
Issue-ID: CCSDK-475

89 files changed:
ms/pom.xml
ms/vlantag-api/.checkstyle [new file with mode: 0644]
ms/vlantag-api/.gitignore [new file with mode: 0644]
ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar [new file with mode: 0644]
ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties [new file with mode: 0644]
ms/vlantag-api/README.md [new file with mode: 0644]
ms/vlantag-api/mvnw [new file with mode: 0644]
ms/vlantag-api/mvnw.cmd [new file with mode: 0644]
ms/vlantag-api/pom.xml [new file with mode: 0644]
ms/vlantag-api/src/main/docker/Dockerfile [new file with mode: 0644]
ms/vlantag-api/src/main/docker/startService.sh [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java [new file with mode: 0644]
ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/handlebars-2.0.0.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery-1.8.0.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.ba-bbq.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.slideto.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.wiggle.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/js-yaml.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jsoneditor.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/lodash.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/marked.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/swagger-oauth.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/o2c.html [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.min.js [new file with mode: 0644]
ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger.json [new file with mode: 0644]
ms/vlantag-api/src/main/resources/application.properties [new file with mode: 0644]
ms/vlantag-api/src/main/resources/banner.txt [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java [new file with mode: 0644]
ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/util/MockResourceAllocator.java [new file with mode: 0644]

index e1adbf9..60b2f11 100644 (file)
@@ -39,6 +39,7 @@
 
     <modules>
         <module>neng</module>
+       <module>vlantag-api</module>
     </modules>
 </project>
 
diff --git a/ms/vlantag-api/.checkstyle b/ms/vlantag-api/.checkstyle
new file mode 100644 (file)
index 0000000..e1faa43
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<fileset-config file-format-version="1.2.0" simple-config="false" sync-formatter="false"/>
diff --git a/ms/vlantag-api/.gitignore b/ms/vlantag-api/.gitignore
new file mode 100644 (file)
index 0000000..ea84856
--- /dev/null
@@ -0,0 +1,26 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/build/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/target-ide/
diff --git a/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar
new file mode 100644 (file)
index 0000000..9cc84ea
Binary files /dev/null and b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar differ
diff --git a/ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties
new file mode 100644 (file)
index 0000000..b573bb5
--- /dev/null
@@ -0,0 +1 @@
+distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip
diff --git a/ms/vlantag-api/README.md b/ms/vlantag-api/README.md
new file mode 100644 (file)
index 0000000..e86fa0b
--- /dev/null
@@ -0,0 +1,33 @@
+<!-- 
+ * ============LICENSE_START=======================================================
+ * ONAP : CCSDK.apps
+ * ================================================================================
+ * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+  -->
+
+## ONAP-CCSDK.apps-Vlantag API
+
+Micro-service to generate vlan tags for VNFs based on Vlan tag policies.
+
+
+
+### Build and test
+
+````bash
+$ mvn clean install
+````
+
+
diff --git a/ms/vlantag-api/mvnw b/ms/vlantag-api/mvnw
new file mode 100644 (file)
index 0000000..5bf251c
--- /dev/null
@@ -0,0 +1,225 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+#   MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+  if [ -f /etc/mavenrc ] ; then
+    . /etc/mavenrc
+  fi
+
+  if [ -f "$HOME/.mavenrc" ] ; then
+    . "$HOME/.mavenrc"
+  fi
+
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true
+    # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+    # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+    if [ -z "$JAVA_HOME" ]; then
+      if [ -x "/usr/libexec/java_home" ]; then
+        export JAVA_HOME="`/usr/libexec/java_home`"
+      else
+        export JAVA_HOME="/Library/Java/Home"
+      fi
+    fi
+    ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+  javaExecutable="`which javac`"
+  if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+    # readlink(1) is not available as standard on Solaris 10.
+    readLink=`which readlink`
+    if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+      if $darwin ; then
+        javaHome="`dirname \"$javaExecutable\"`"
+        javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+      else
+        javaExecutable="`readlink -f \"$javaExecutable\"`"
+      fi
+      javaHome="`dirname \"$javaExecutable\"`"
+      javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+      JAVA_HOME="$javaHome"
+      export JAVA_HOME
+    fi
+  fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly." >&2
+  echo "  We cannot execute $JAVACMD" >&2
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+  if [ -z "$1" ]
+  then
+    echo "Path not specified to find_maven_basedir"
+    return 1
+  fi
+
+  basedir="$1"
+  wdir="$1"
+  while [ "$wdir" != '/' ] ; do
+    if [ -d "$wdir"/.mvn ] ; then
+      basedir=$wdir
+      break
+    fi
+    # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+    if [ -d "${wdir}" ]; then
+      wdir=`cd "$wdir/.."; pwd`
+    fi
+    # end of workaround
+  done
+  echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+  if [ -f "$1" ]; then
+    echo "$(tr -s '\n' ' ' < "$1")"
+  fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+  exit 1;
+fi
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+echo $MAVEN_PROJECTBASEDIR
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+  [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+    MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+  "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+  ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/ms/vlantag-api/mvnw.cmd b/ms/vlantag-api/mvnw.cmd
new file mode 100644 (file)
index 0000000..019bd74
--- /dev/null
@@ -0,0 +1,143 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
diff --git a/ms/vlantag-api/pom.xml b/ms/vlantag-api/pom.xml
new file mode 100644 (file)
index 0000000..431d0a3
--- /dev/null
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+       <modelVersion>4.0.0</modelVersion>
+
+       <groupId>org.onap.ccsdk.apps.ms.vlantagapi</groupId>
+       <artifactId>vlantag-api</artifactId>
+       <version>0.3.0-SNAPSHOT</version>
+       <packaging>jar</packaging>
+
+       <name>vlantag-api</name>
+       <description>Vlantag Api Service for Vlantag management of VNFs</description>
+
+       <properties>
+               <swagger.directory>${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist</swagger.directory>
+               <swagger.annotations.version>1.5.8</swagger.annotations.version>
+               <java.version>1.8</java.version>
+               <springboot.version>2.0.4.RELEASE</springboot.version>
+               <mysql.connector.version>5.1.46</mysql.connector.version>
+               <ccsdk.sli.adaptors.version>0.3.0-SNAPSHOT</ccsdk.sli.adaptors.version>
+               <docker.registry>TBD:5100</docker.registry>
+               <serviceArtifactName>vlantagapi</serviceArtifactName>
+
+               <!-- Sonar -->
+               <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
+               <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
+               <sonar.surefire.reportsPath>${basedir}/target/surefire-reports</sonar.surefire.reportsPath>
+               <sonar.failsafe.reportsPath>${basedir}/target/failsafe-reports</sonar.failsafe.reportsPath>
+               <jacoco.path>${basedir}/target/jacoco_report</jacoco.path>
+               <jacoco.itPath>${basedir}/target/jacoco_itReport</jacoco.itPath>
+               <sonar.jacoco.reportPath>${basedir}/target/jacoco-ut.exec</sonar.jacoco.reportPath>
+               <sonar.jacoco.itReportPath>${basedir}/target/jacoco-it.exec</sonar.jacoco.itReportPath>
+               <sonar.language>java</sonar.language>
+               <ilib.version>2.0.7</ilib.version>
+       </properties>
+
+       <parent>
+               <groupId>org.springframework.boot</groupId>
+               <artifactId>spring-boot-starter-parent</artifactId>
+               <version>2.0.4.RELEASE</version>
+               <relativePath />
+       </parent>
+
+
+       <dependencies>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-jersey</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-web</artifactId>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-test</artifactId>
+                       <scope>test</scope>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-actuator</artifactId>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.springframework.boot</groupId>
+                       <artifactId>spring-boot-starter-security</artifactId>
+                       <version>2.0.1.RELEASE</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>org.onap.ccsdk.sli.adaptors</groupId>
+                       <artifactId>resource-assignment-provider</artifactId>
+                       <version>${ccsdk.sli.adaptors.version}</version>
+                       <exclusions>
+                               <exclusion>
+                                       <groupId>org.slf4j</groupId>
+                                       <artifactId>slf4j-simple</artifactId>
+                               </exclusion>
+                       </exclusions>
+               </dependency>
+
+               <dependency>
+                       <groupId>mysql</groupId>
+                       <artifactId>mysql-connector-java</artifactId>
+                       <version>5.1.46</version>
+               </dependency>
+
+               <dependency>
+                       <groupId>io.swagger</groupId>
+                       <artifactId>swagger-annotations</artifactId>
+                       <version>1.5.8</version>
+               </dependency>
+       </dependencies>
+
+
+
+       <build>
+               <plugins>
+                   <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <argLine>${surefireArgLine}</argLine>
+                    <skipTests>${skip.unit.tests}</skipTests>
+                    <excludes>
+                        <exclude>**/IT*.java</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+                       <plugin>
+                               <groupId>org.jacoco</groupId>
+                               <artifactId>jacoco-maven-plugin</artifactId>
+                               <version>0.7.5.201505241946</version>
+                               <executions>
+                                       <!-- Prepares the property pointing to the JaCoCo runtime agent which 
+                                               is passed as VM argument when Maven the Surefire plugin is executed. -->
+                                       <execution>
+                                               <id>pre-unit-test</id>
+                                               <goals>
+                                                       <goal>prepare-agent</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <!-- Sets the path to the file which contains the execution data. -->
+                                                       <destFile>${sonar.jacoco.reportPath}</destFile>
+                                                       <propertyName>surefireArgLine</propertyName>
+                                               </configuration>
+                                       </execution>
+                                       <!-- Ensures that the code coverage report for unit tests is created 
+                                               after unit tests have been run. -->
+                                       <execution>
+                                               <id>post-unit-test</id>
+                                               <phase>test</phase>
+                                               <goals>
+                                                       <goal>report</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <!-- Sets the path to the file which contains the execution data. -->
+                                                       <dataFile>${sonar.jacoco.reportPath}</dataFile>
+                                                       <!-- Sets the output directory for the code coverage report. -->
+                                                       <outputDirectory>${jacoco.path}</outputDirectory>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>com.github.kongchen</groupId>
+                               <artifactId>swagger-maven-plugin</artifactId>
+                               <version>3.1.7</version>
+                               <configuration>
+                                       <apiSources>
+                                               <apiSource>
+                                                       <schemes>
+                                                               <scheme>http</scheme>
+                                                               <scheme>https</scheme>
+                                                       </schemes>
+                                                       <host>localhost:9091</host>
+                                                       <locations>
+                                                               <location>org.onap.ccsdk.apps.ms.vlantagapi.core.service</location>
+                                                               <location>org.onap.ccsdk.apps.ms.vlantagapi.core.model</location>
+                                                       </locations>
+                                                       <!-- <locations>org.onap.ccsdk.apps.ms.vlantagapi.core.service</locations> -->
+                                                       <basePath>/vlantagapi</basePath>
+                                                       <info>
+                                                               <title>${project.artifactId} Service</title>
+                                                               <version>${project.version}</version>
+                                                       </info>
+                                                       <securityDefinitions>
+                                                               <securityDefinition>
+                                                                       <name>basicAuth</name>
+                                                                       <type>basic</type>
+                                                               </securityDefinition>
+                                                       </securityDefinitions>
+                                                       <swaggerDirectory>${swagger.directory}</swaggerDirectory>
+                                               </apiSource>
+                                       </apiSources>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <!-- <phase>compile</phase> -->
+                                               <phase>package</phase>
+                                               <goals>
+                                                       <goal>generate</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+                       <plugin>
+                               <groupId>com.spotify</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>0.4.11</version>
+                               <configuration>
+                                       <imageName>${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName}</imageName>
+                                       <dockerDirectory>src/main/docker</dockerDirectory>
+                                       <serverId>docker-hub</serverId>
+                                       <registryUrl>https://${docker.registry}</registryUrl>
+                                       <imageTags>
+                                               <imageTag>${project.version}</imageTag>
+                                               <imageTag>latest</imageTag>
+                                       </imageTags>
+                                       <forceTags>true</forceTags>
+                                       <resources>
+                                               <resource>
+                                                       <targetPath>/</targetPath>
+                                                       <directory>${project.build.directory}</directory>
+                                                       <include>${project.build.finalName}.jar</include>
+                                               </resource>
+                                       </resources>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.springframework.boot</groupId>
+                               <artifactId>spring-boot-maven-plugin</artifactId>
+                               <version>${springboot.version}</version>
+                               <executions>
+                                       <execution>
+                                               <goals>
+                                                       <goal>repackage</goal>
+                                               </goals>
+                                       </execution>
+                               </executions>
+                       </plugin>
+               </plugins>
+       </build>
+
+
+</project>
diff --git a/ms/vlantag-api/src/main/docker/Dockerfile b/ms/vlantag-api/src/main/docker/Dockerfile
new file mode 100644 (file)
index 0000000..8b7e615
--- /dev/null
@@ -0,0 +1,5 @@
+FROM anapsix/alpine-java:8_jdk\r
+ADD vlantag-api-0.3.0-SNAPSHOT.jar app.jar\r
+ADD startService.sh /startService.sh\r
+RUN chmod 700 /startService.sh\r
+ENTRYPOINT ./startService.sh \r
diff --git a/ms/vlantag-api/src/main/docker/startService.sh b/ms/vlantag-api/src/main/docker/startService.sh
new file mode 100644 (file)
index 0000000..e7d3121
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh\r
+app_args=-Dspring.config.location=${APP_CONFIG_HOME}\r
+echo "app_args ="${app_args}\r
+java -Djava.security.egd=file:/dev/./urandom  ${app_args} -Xms1024m -Xmx1024m  -jar  /app.jar\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java
new file mode 100644 (file)
index 0000000..bd18a98
--- /dev/null
@@ -0,0 +1,34 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core;\r
+\r
+import org.springframework.boot.SpringApplication;\r
+import org.springframework.boot.autoconfigure.EnableAutoConfiguration;\r
+import org.springframework.boot.autoconfigure.SpringBootApplication;\r
+\r
+/**\r
+ * Application.java Purpose: Entry point for the micro-service -- it starts up the application.\r
+ * \r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@SpringBootApplication(scanBasePackages={"org.onap.ccsdk.apps.ms.vlantagapi", "org.onap.ccsdk.sli.core", "org.onap.ccsdk.sli.adaptors"})\r
+public class Application {\r
+\r
+       public static void main(String[] args) {\r
+               SpringApplication.run(Application.class, args);\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java
new file mode 100644 (file)
index 0000000..bd0abe6
--- /dev/null
@@ -0,0 +1,97 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Base64;\r
+import java.util.List;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.context.annotation.Configuration;\r
+import org.springframework.core.env.Environment;\r
+import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;\r
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;\r
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;\r
+import org.springframework.security.config.http.SessionCreationPolicy;\r
+import org.springframework.security.core.userdetails.User;\r
+import org.springframework.security.core.userdetails.UserDetails;\r
+import org.springframework.security.crypto.factory.PasswordEncoderFactories;\r
+import org.springframework.security.crypto.password.PasswordEncoder;\r
+import org.springframework.security.provisioning.InMemoryUserDetailsManager;\r
+\r
+/**\r
+ * ApplicationSecurityConfig.java Purpose: Configures and validates\r
+ * Application Security configurations\r
+ * \r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@Configuration\r
+public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter{\r
+       private Logger logger = LoggerFactory.getLogger(ApplicationSecurityConfig.class);\r
+        \r
+       @Autowired\r
+       private Environment environment;\r
+\r
+       @Override\r
+       protected void configure(AuthenticationManagerBuilder auth) throws Exception {\r
+               List<UserDetails> userDetails = new ArrayList<>();\r
+               \r
+               PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder();\r
+       final User.UserBuilder userBuilder = User.builder().passwordEncoder(encoder::encode);\r
+\r
+               String authString = environment.getProperty("application.authToken");\r
+               String[] tokens = authString.split(";");\r
+               for (int i = 0; i < tokens.length; i++) {\r
+                       String token = tokens[i];\r
+                       String[] cred = token.split("~"); \r
+                       String[] uidpwdarr = decode(cred[0]);\r
+                       logger.info("------uid/pwd ----------------{}, {}",uidpwdarr[0],uidpwdarr[1]);  \r
+                       \r
+                       UserDetails user = userBuilder\r
+                   .username(uidpwdarr[0])\r
+                   .password(uidpwdarr[1])\r
+                   .roles(cred[1])\r
+                   .build();\r
+                       \r
+                       userDetails.add(user);\r
+               }\r
+               \r
+               logger.info("-------------------------------{}",userDetails);\r
+               auth.userDetailsService(inMemoryUserDetailsManager(userDetails));\r
+       }\r
+       \r
+    \r
+    public InMemoryUserDetailsManager inMemoryUserDetailsManager(List<UserDetails> userDetails) {          \r
+        return new InMemoryUserDetailsManager(userDetails);\r
+    }\r
+\r
+       @Override\r
+       protected void configure(HttpSecurity http) throws Exception {\r
+               http.authorizeRequests().anyRequest().fullyAuthenticated();\r
+           http.httpBasic().and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS);\r
+               http.csrf().disable();\r
+       }\r
+       \r
+    private static String[] decode(String encoded) {\r
+        final byte[] decodedBytes \r
+                = Base64.getDecoder().decode(encoded.getBytes());\r
+        final String pair = new String(decodedBytes);\r
+        return pair.split(":", 2);\r
+    }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java
new file mode 100644 (file)
index 0000000..f487723
--- /dev/null
@@ -0,0 +1,35 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core;\r
+\r
+import org.glassfish.jersey.server.ResourceConfig;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.service.VlantagApiServiceImpl;\r
+import org.springframework.stereotype.Component;\r
+\r
+/**\r
+ * JerseyConfiguration.java Purpose: Configuration of the REST framework.\r
+ * \r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@Component\r
+public class JerseyConfiguration extends ResourceConfig\r
+{\r
+    public JerseyConfiguration()\r
+    {\r
+        register(VlantagApiServiceImpl.class);\r
+    }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java
new file mode 100644 (file)
index 0000000..3c84532
--- /dev/null
@@ -0,0 +1,192 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core;\r
+\r
+import java.util.Arrays;\r
+import java.util.Collections;\r
+import java.util.HashMap;\r
+import java.util.List;\r
+import java.util.Map;\r
+\r
+import javax.sql.DataSource;\r
+\r
+import org.onap.ccsdk.sli.adaptors.lock.comp.LockHelper;\r
+import org.onap.ccsdk.sli.adaptors.lock.comp.LockHelperImpl;\r
+import org.onap.ccsdk.sli.adaptors.lock.dao.ResourceLockDao;\r
+import org.onap.ccsdk.sli.adaptors.lock.dao.ResourceLockDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.ra.ResourceAllocator;\r
+import org.onap.ccsdk.sli.adaptors.ra.alloc.DbAllocationRule;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.AllocationRule;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.EndPointAllocator;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.EndPointAllocatorImpl;\r
+import org.onap.ccsdk.sli.adaptors.ra.rule.dao.RangeRuleDao;\r
+import org.onap.ccsdk.sli.adaptors.ra.rule.dao.RangeRuleDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.ra.rule.dao.ResourceRuleDao;\r
+import org.onap.ccsdk.sli.adaptors.ra.rule.dao.ResourceRuleDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.rm.comp.ResourceManager;\r
+import org.onap.ccsdk.sli.adaptors.rm.comp.ResourceManagerImpl;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.ResourceDao;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.AllocationItemJdbcDao;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.AllocationItemJdbcDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceJdbcDao;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceJdbcDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceLoadJdbcDao;\r
+import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceLoadJdbcDaoImpl;\r
+import org.onap.ccsdk.sli.adaptors.util.db.CachedDataSourceWrap;\r
+import org.onap.ccsdk.sli.adaptors.util.db.DataSourceWrap;\r
+import org.onap.ccsdk.sli.adaptors.util.speed.SpeedUtil;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.context.annotation.Bean;\r
+import org.springframework.context.annotation.Configuration;\r
+import org.springframework.jdbc.core.JdbcTemplate;\r
+import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;\r
+import org.springframework.stereotype.Component;\r
+\r
+/**\r
+ * ResourceAssignmentInitializer.java Purpose: Represents and Initializes\r
+ * Resource Assignment Spring Module Beans\r
+ * \r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+\r
+@Component\r
+@Configuration\r
+public class ResourceAssignmentInitializer {\r
+\r
+       private static final Logger log = LoggerFactory.getLogger(ResourceAssignmentInitializer.class);\r
+       \r
+       \r
+       @Bean\r
+    public JdbcTemplate getJdbcTemplate(DataSource dataSource) {\r
+        return new JdbcTemplate(dataSource);\r
+    }\r
+       \r
+       @Bean\r
+       public ResourceLockDaoImpl getResourceLockDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               ResourceLockDaoImpl resourceLockDaoImpl = new ResourceLockDaoImpl();\r
+               resourceLockDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+               \r
+               return resourceLockDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public LockHelperImpl getLockHelperImpl(ResourceLockDao resourceLockDao) {\r
+               LockHelperImpl lockHelperImpl = new LockHelperImpl();\r
+               lockHelperImpl.setLockWait(5);\r
+               lockHelperImpl.setRetryCount(10);\r
+               lockHelperImpl.setResourceLockDao(resourceLockDao);\r
+               \r
+               return lockHelperImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public ResourceJdbcDaoImpl getResourceJdbcDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               ResourceJdbcDaoImpl resourceJdbcDaoImpl = new ResourceJdbcDaoImpl();\r
+               resourceJdbcDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+               return resourceJdbcDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public AllocationItemJdbcDaoImpl getAllocationItemJdbcDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               AllocationItemJdbcDaoImpl allocationItemJdbcDaoImpl = new AllocationItemJdbcDaoImpl();\r
+               allocationItemJdbcDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+               return allocationItemJdbcDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public ResourceLoadJdbcDaoImpl getResourceLoadJdbcDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               ResourceLoadJdbcDaoImpl resourceLoadJdbcDaoImpl = new ResourceLoadJdbcDaoImpl();\r
+               resourceLoadJdbcDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+               return resourceLoadJdbcDaoImpl;\r
+       }\r
+       \r
+       \r
+       @Bean\r
+       public ResourceDaoImpl getResourceDaoImpl(ResourceJdbcDao resourceJdbcDao, AllocationItemJdbcDao allocationItemJdbcDao, ResourceLoadJdbcDao resourceLoadJdbcDao) {\r
+               ResourceDaoImpl resourceDaoImpl = new ResourceDaoImpl();\r
+               resourceDaoImpl.setAllocationItemJdbcDao(allocationItemJdbcDao);\r
+               resourceDaoImpl.setResourceJdbcDao(resourceJdbcDao);\r
+               resourceDaoImpl.setResourceLoadJdbcDao(resourceLoadJdbcDao);\r
+               \r
+               return resourceDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public ResourceManagerImpl getResourceManagerImpl(LockHelper lockHelper, ResourceDao resourceDao) {\r
+               ResourceManagerImpl resourceManagerImpl = new ResourceManagerImpl();\r
+               resourceManagerImpl.setLockHelper(lockHelper);\r
+               resourceManagerImpl.setLockTimeout(600);\r
+               resourceManagerImpl.setResourceDao(resourceDao);\r
+               \r
+               return resourceManagerImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public ResourceRuleDaoImpl getResourceRuleDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               ResourceRuleDaoImpl resourceRuleDaoImpl = new ResourceRuleDaoImpl();\r
+               resourceRuleDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+                               \r
+               return resourceRuleDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public RangeRuleDaoImpl getRangeRuleDaoImpl(JdbcTemplate jdbcTemplate) {\r
+               RangeRuleDaoImpl rangeRuleDaoImpl = new RangeRuleDaoImpl();\r
+               rangeRuleDaoImpl.setJdbcTemplate(jdbcTemplate);\r
+                               \r
+               return rangeRuleDaoImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public ResourceAllocator getResourceAllocator(ResourceManager resourceManager, EndPointAllocator endPointAllocator, SpeedUtil speedUtil) {\r
+               ResourceAllocator resourceAllocator = new ResourceAllocator();\r
+               resourceAllocator.setEndPointAllocator(endPointAllocator);\r
+               resourceAllocator.setResourceManager(resourceManager);\r
+               resourceAllocator.setSpeedUtil(speedUtil);\r
+                               \r
+               return resourceAllocator;\r
+       }\r
+       \r
+       @Bean\r
+       public SpeedUtil getSpeedUtil() {\r
+               return new SpeedUtil();\r
+       }\r
+       \r
+       @Bean\r
+       public EndPointAllocatorImpl getEndPointAllocatorImpl(ResourceManager resourceManager, DbAllocationRule dbAllocationRule) {\r
+               EndPointAllocatorImpl endPointAllocatorImpl = new EndPointAllocatorImpl();\r
+               \r
+               Map<String, List<AllocationRule>> allocationRuleMap = new HashMap<>();\r
+               allocationRuleMap.put("DEFAULT", Arrays.asList(dbAllocationRule));\r
+                               \r
+               endPointAllocatorImpl.setResourceManager(resourceManager);\r
+               endPointAllocatorImpl.setAllocationRuleMap(allocationRuleMap);\r
+\r
+               return endPointAllocatorImpl;\r
+       }\r
+       \r
+       @Bean\r
+       public DbAllocationRule getDbAllocationRule(ResourceRuleDao resourceRuleDao, RangeRuleDao rangeRuleDao) {\r
+               DbAllocationRule dbAllocationRule = new DbAllocationRule();\r
+               dbAllocationRule.setRangeRuleDao(rangeRuleDao);\r
+               dbAllocationRule.setResourceRuleDao(resourceRuleDao);\r
+               \r
+               return dbAllocationRule;\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java
new file mode 100644 (file)
index 0000000..32ce184
--- /dev/null
@@ -0,0 +1,47 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.exception;\r
+\r
+/**\r
+ * VlantagApiException.java Purpose: Represents application exceptions generated by this micro-service.\r
+ * \r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class VlantagApiException extends Exception {\r
+       \r
+       private static final long serialVersionUID = 1L;\r
+       \r
+       public VlantagApiException()\r
+       {\r
+               super();\r
+       }\r
+       \r
+       public VlantagApiException(String message)\r
+       {\r
+               super(message);\r
+       }\r
+       \r
+       public VlantagApiException(String message, Throwable t)\r
+       {\r
+               super(message, t);\r
+       }\r
+\r
+       public VlantagApiException(Throwable arg0) {\r
+               super(arg0);\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java
new file mode 100644 (file)
index 0000000..70f19c0
--- /dev/null
@@ -0,0 +1,57 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+/**\r
+ * AllowedRanges.java Purpose: POJO representing policy manager\r
+ * get-config response AllowedRanges model defines Vlantag Range\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class AllowedRanges {\r
+       \r
+       @JsonProperty("min")\r
+       String min;\r
+       \r
+       @JsonProperty("max")\r
+       String max;\r
+\r
+       public String getMin() {\r
+               return min;\r
+       }\r
+\r
+       public void setMin(String min) {\r
+               this.min = min;\r
+       }\r
+\r
+       public String getMax() {\r
+               return max;\r
+       }\r
+\r
+       public void setMax(String max) {\r
+               this.max = max;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "AllowedRanges [min=" + min + ", max=" + max + "]";\r
+       }\r
+       \r
+       \r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java
new file mode 100644 (file)
index 0000000..2060463
--- /dev/null
@@ -0,0 +1,96 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import java.util.List;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+/**\r
+ * Elements.java Purpose: POJO representing policy manager\r
+ * get-config response Element model within a Resource Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class Elements {\r
+       \r
+       @JsonProperty("recycle-vlantag-range")\r
+       String recycleVlantagRange;\r
+       \r
+       @JsonProperty("overwrite")\r
+       String overwrite;\r
+       \r
+       @JsonProperty("vlantag-name")\r
+       String vlantagName;\r
+       \r
+       @JsonProperty("allowed-range")\r
+       private List<AllowedRanges> allowedRanges;\r
+       \r
+       @JsonProperty("element-vlan-role")\r
+       String elementVlanRole;\r
+       \r
+\r
+       public String getRecycleVlantagRange() {\r
+               return recycleVlantagRange;\r
+       }\r
+\r
+       public void setRecycleVlantagRange(String recycleVlantagRange) {\r
+               this.recycleVlantagRange = recycleVlantagRange;\r
+       }\r
+\r
+       public String getOverwrite() {\r
+               return overwrite;\r
+       }\r
+\r
+       public void setOverwrite(String overwrite) {\r
+               this.overwrite = overwrite;\r
+       }\r
+\r
+       public String getVlantagName() {\r
+               return vlantagName;\r
+       }\r
+\r
+       public void setVlantagName(String vlantagName) {\r
+               this.vlantagName = vlantagName;\r
+       }\r
+\r
+       public List<AllowedRanges> getAllowedRanges() {\r
+               return allowedRanges;\r
+       }\r
+\r
+       public void setAllowedRanges(List<AllowedRanges> allowedRanges) {\r
+               this.allowedRanges = allowedRanges;\r
+       }\r
+\r
+       public String getElementVlanRole() {\r
+               return elementVlanRole;\r
+       }\r
+\r
+       public void setElementVlanRole(String elementVlanRole) {\r
+               this.elementVlanRole = elementVlanRole;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "Elements [recycleVlantagRange=" + recycleVlantagRange + ", overwrite=" + overwrite + ", vlantagName="\r
+                               + vlantagName + ", allowedRanges=" + allowedRanges + ", elementVlanRole=" + elementVlanRole + "]";\r
+       }\r
+\r
+\r
+       \r
+       \r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java
new file mode 100644 (file)
index 0000000..354f83a
--- /dev/null
@@ -0,0 +1,172 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import java.io.Serializable;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+/**\r
+ * PolicyConfig.java Purpose: POJO representing policy manager\r
+ * get-config response\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class PolicyConfig implements Serializable {\r
+\r
+       /**\r
+        * \r
+        */\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       @JsonProperty("configName")\r
+       private String configName;\r
+       \r
+       @JsonProperty("riskLevel")\r
+       private String riskLevel;\r
+\r
+       @JsonProperty("policyName")\r
+       private String policyName;\r
+\r
+       @JsonProperty("policyScope")\r
+       private String policyScope;\r
+\r
+       @JsonProperty("guard")\r
+       private String guard;\r
+\r
+       @JsonProperty("description")\r
+       private String description;\r
+\r
+       @JsonProperty("priority")\r
+       private String priority;\r
+\r
+       @JsonProperty("uuid")\r
+       private String uuid;\r
+\r
+       @JsonProperty("version")\r
+       private String version;\r
+\r
+       @JsonProperty("content")\r
+       private PolicyContent content;\r
+\r
+       @JsonProperty("riskType")\r
+       private String riskType;\r
+\r
+       @JsonProperty("service")\r
+       private String service;\r
+\r
+       @JsonProperty("location")\r
+       private String location;\r
+\r
+       @JsonProperty("templateVersion")\r
+       private String templateVersion;\r
+\r
+       public String getConfigName() {\r
+               return configName;\r
+       }\r
+       public void setConfigName(String configName) {\r
+               this.configName = configName;\r
+       }\r
+       public String getRiskLevel() {\r
+               return riskLevel;\r
+       }\r
+       public void setRiskLevel(String riskLevel) {\r
+               this.riskLevel = riskLevel;\r
+       }\r
+       public String getPolicyName() {\r
+               return policyName;\r
+       }\r
+       public void setPolicyName(String policyName) {\r
+               this.policyName = policyName;\r
+       }\r
+       public String getPolicyScope() {\r
+               return policyScope;\r
+       }\r
+       public void setPolicyScope(String policyScope) {\r
+               this.policyScope = policyScope;\r
+       }\r
+       public String getGuard() {\r
+               return guard;\r
+       }\r
+       public void setGuard(String guard) {\r
+               this.guard = guard;\r
+       }\r
+       public String getDescription() {\r
+               return description;\r
+       }\r
+       public void setDescription(String description) {\r
+               this.description = description;\r
+       }\r
+       public String getPriority() {\r
+               return priority;\r
+       }\r
+       public void setPriority(String priority) {\r
+               this.priority = priority;\r
+       }\r
+       public String getUuid() {\r
+               return uuid;\r
+       }\r
+       public void setUuid(String uuid) {\r
+               this.uuid = uuid;\r
+       }\r
+       public String getVersion() {\r
+               return version;\r
+       }\r
+       public void setVersion(String version) {\r
+               this.version = version;\r
+       }\r
+\r
+       public PolicyContent getContent() {\r
+               return content;\r
+       }\r
+       public void setContent(PolicyContent content) {\r
+               this.content = content;\r
+       }\r
+       public String getRiskType() {\r
+               return riskType;\r
+       }\r
+       public void setRiskType(String riskType) {\r
+               this.riskType = riskType;\r
+       }\r
+       public String getService() {\r
+               return service;\r
+       }\r
+       public void setService(String service) {\r
+               this.service = service;\r
+       }\r
+       public String getLocation() {\r
+               return location;\r
+       }\r
+       public void setLocation(String location) {\r
+               this.location = location;\r
+       }\r
+       public String getTemplateVersion() {\r
+               return templateVersion;\r
+       }\r
+       public void setTemplateVersion(String templateVersion) {\r
+               this.templateVersion = templateVersion;\r
+       }\r
+       @Override\r
+       public String toString() {\r
+               return "PolicyConfig [configName=" + configName + ", riskLevel=" + riskLevel + ", policyName=" + policyName\r
+                               + ", policyScope=" + policyScope + ", guard=" + guard + ", description=" + description + ", priority="\r
+                               + priority + ", uuid=" + uuid + ", version=" + version + ", content=" + content + ", riskType="\r
+                               + riskType + ", service=" + service + ", location=" + location + ", templateVersion=" + templateVersion\r
+                               + "]";\r
+       }\r
+       \r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java
new file mode 100644 (file)
index 0000000..2f60d8f
--- /dev/null
@@ -0,0 +1,59 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import java.util.List;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+/**\r
+ * PolicyContent.java Purpose: POJO representing policy manager\r
+ * get-config response contents\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class PolicyContent {\r
+\r
+       @JsonProperty("resource-models")\r
+       private List<ResourceModel> resourceModels;\r
+       \r
+       @JsonProperty("policy-instance-name")\r
+       private String policyInstanceName;\r
+       \r
+       public String getPolicyInstanceName() {\r
+               return policyInstanceName;\r
+       }\r
+\r
+       public void setPolicyInstanceName(String policyInstanceName) {\r
+               this.policyInstanceName = policyInstanceName;\r
+       }\r
+\r
+       public List<ResourceModel> getResourceModels() {\r
+               return resourceModels;\r
+       }\r
+\r
+       public void setResourceModels(List<ResourceModel> resourceModels) {\r
+               this.resourceModels = resourceModels;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "PolicyContent [resourceModels=" + resourceModels + ", policyInstanceName=" + policyInstanceName + "]";\r
+       }\r
+       \r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java
new file mode 100644 (file)
index 0000000..5c32842
--- /dev/null
@@ -0,0 +1,20 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+public interface PolicyData {\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java
new file mode 100644 (file)
index 0000000..0707cd3
--- /dev/null
@@ -0,0 +1,141 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import java.io.Serializable;\r
+import java.util.HashMap;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+/**\r
+ * PolicyEngineResponse.java Purpose: POJO representing policy manager get-config response\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class PolicyEngineResponse implements Serializable {\r
+\r
+       /**\r
+        * \r
+        */\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       @JsonProperty("policyConfigMessage")\r
+       private String policyConfigMessage;\r
+\r
+       @JsonProperty("policyConfigStatus")\r
+       private String policyConfigStatus;\r
+\r
+       @JsonProperty("type")\r
+       private String type;\r
+\r
+       @JsonProperty("config")\r
+       private String config;\r
+\r
+       @JsonProperty("policyName")\r
+       private String policyName;\r
+\r
+       @JsonProperty("policyType")\r
+       private String policyType;\r
+       \r
+       @JsonProperty("policyVersion")\r
+       private String policyVersion;\r
+\r
+       @JsonProperty("matchingConditions")\r
+       private HashMap<String, String> matchingConditions;\r
+\r
+       @JsonProperty("responseAttributes")\r
+       private HashMap<String, String> responseAttributes;\r
+\r
+       @JsonProperty("property")\r
+       private String property;\r
+       \r
+       public PolicyEngineResponse() {\r
+               \r
+       }\r
+\r
+       public String getPolicyConfigMessage() {\r
+               return policyConfigMessage;\r
+       }\r
+       public void setPolicyConfigMessage(String policyConfigMessage) {\r
+               this.policyConfigMessage = policyConfigMessage;\r
+       }\r
+       public String getPolicyConfigStatus() {\r
+               return policyConfigStatus;\r
+       }\r
+       public void setPolicyConfigStatus(String policyConfigStatus) {\r
+               this.policyConfigStatus = policyConfigStatus;\r
+       }\r
+       public String getType() {\r
+               return type;\r
+       }\r
+       public void setType(String type) {\r
+               this.type = type;\r
+       }\r
+       public String getConfig() {\r
+               return config;\r
+       }\r
+       @JsonProperty("config")\r
+       public void setConfig(String config) {\r
+               this.config = config;\r
+       }\r
+       public String getPolicyName() {\r
+               return policyName;\r
+       }\r
+       public void setPolicyName(String policyName) {\r
+               this.policyName = policyName;\r
+       }\r
+       public String getPolicyType() {\r
+               return policyType;\r
+       }\r
+       public void setPolicyType(String type) {\r
+               this.policyType = type;\r
+       }\r
+       public String getPolicyVersion() {\r
+               return policyVersion;\r
+       }\r
+       public void setPolicyVersion(String policyVersion) {\r
+               this.policyVersion = policyVersion;\r
+       }\r
+       public HashMap<String, String> getMatchingConditions() {\r
+               return matchingConditions;\r
+       }\r
+       @JsonProperty("matchingConditions")\r
+       public void setMatchingConditions(HashMap<String, String> matchingConditions) {\r
+               this.matchingConditions = matchingConditions;\r
+       }\r
+       public HashMap<String, String> getResponseAttributes() {\r
+               return responseAttributes;\r
+       }\r
+       public void setResponseAttributes(HashMap<String, String> responseAttributes) {\r
+               this.responseAttributes = responseAttributes;\r
+       }\r
+       public String getProperty() {\r
+               return property;\r
+       }\r
+       public void setProperty(String property) {\r
+               this.property = property;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "PolicyEngineResponse [policyConfigMessage=" + policyConfigMessage + ", policyConfigStatus="\r
+                               + policyConfigStatus + ", type=" + type + ", config=" + config + ", policyName=" + policyName\r
+                               + ", policyType=" + policyType + ", policyVersion=" + policyVersion + ", matchingConditions="\r
+                               + matchingConditions + ", responseAttributes=" + responseAttributes + ", property=" + property + "]";\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java
new file mode 100644 (file)
index 0000000..bd2fd6e
--- /dev/null
@@ -0,0 +1,41 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+/**\r
+ * RequestObject.java Purpose: POJO representing policy manager get-config request\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class RequestObject {\r
+\r
+       private String policyName;\r
+\r
+       public String getPolicyName() {\r
+               return policyName;\r
+       }\r
+\r
+       public void setPolicyName(String policyName) {\r
+               this.policyName = policyName;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "RequestObject [policyName=" + policyName + "]";\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java
new file mode 100644 (file)
index 0000000..8f865f9
--- /dev/null
@@ -0,0 +1,145 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model;\r
+\r
+import java.util.List;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;\r
+\r
+/**\r
+ * ResourceModel.java Purpose: POJO representing policy manager get-config response Resource Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@JsonDeserialize(as = ResourceModel.class)\r
+public class ResourceModel implements PolicyData {\r
+       \r
+       @JsonProperty("key-type")\r
+       private String keyType;\r
+       \r
+       @JsonProperty("scope")\r
+       private String scope;\r
+       \r
+       @JsonProperty("resource-resolution-recipe")\r
+       private String resourceResolutionRecipe;\r
+       \r
+       @JsonProperty("resource-name")\r
+       private String resourceName;\r
+       \r
+       @JsonProperty("data-store-object")\r
+       private String dataStoreObject;\r
+       \r
+       @JsonProperty("data-store")\r
+       private String dataStore;\r
+       \r
+       @JsonProperty("elements")\r
+       private List<Elements> elements;\r
+       \r
+       @JsonProperty("resource-vlan-role")\r
+       private String resourceVlanRole;\r
+       \r
+       @JsonProperty("vlan-type")\r
+       private String vlanType;\r
+\r
+\r
+       public String getKeyType() {\r
+               return keyType;\r
+       }\r
+\r
+       public void setKeyType(String keyType) {\r
+               this.keyType = keyType;\r
+       }\r
+\r
+       public String getScope() {\r
+               return scope;\r
+       }\r
+\r
+       public void setScope(String scope) {\r
+               this.scope = scope;\r
+       }\r
+\r
+       public String getResourceResolutionRecipe() {\r
+               return resourceResolutionRecipe;\r
+       }\r
+\r
+       public void setResourceResolutionRecipe(String resourceResolutionRecipe) {\r
+               this.resourceResolutionRecipe = resourceResolutionRecipe;\r
+       }\r
+\r
+       public String getResourceName() {\r
+               return resourceName;\r
+       }\r
+\r
+       public void setResourceName(String resourceName) {\r
+               this.resourceName = resourceName;\r
+       }\r
+\r
+       public String getDataStoreObject() {\r
+               return dataStoreObject;\r
+       }\r
+\r
+       public void setDataStoreObject(String dataStoreObject) {\r
+               this.dataStoreObject = dataStoreObject;\r
+       }\r
+\r
+       public String getDataStore() {\r
+               return dataStore;\r
+       }\r
+\r
+       public void setDataStore(String dataStore) {\r
+               this.dataStore = dataStore;\r
+       }\r
+\r
+       public List<Elements> getElements() {\r
+               return elements;\r
+       }\r
+\r
+       public void setElements(List<Elements> elements) {\r
+               this.elements = elements;\r
+       }\r
+\r
+       public String getResourceVlanRole() {\r
+               return resourceVlanRole;\r
+       }\r
+\r
+       public void setResourceVlanRole(String resourceVlanRole) {\r
+               this.resourceVlanRole = resourceVlanRole;\r
+       }\r
+\r
+       \r
+       public String getVlanType() {\r
+               return vlanType;\r
+       }\r
+\r
+       public void setVlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               return "ResourceModel [keyType=" + keyType + ", scope=" + scope + ", resourceResolutionRecipe="\r
+                               + resourceResolutionRecipe + ", resourceName=" + resourceName + ", dataStoreObject=" + dataStoreObject\r
+                               + ", dataStore=" + dataStore + ", elements=" + elements + ", resourceVlanRole=" + resourceVlanRole\r
+                               + ", vlanType=" + vlanType + "]";\r
+       }\r
+\r
+       \r
+\r
+       \r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java
new file mode 100644 (file)
index 0000000..4b7a714
--- /dev/null
@@ -0,0 +1,94 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * AssignVlanTagRequest.java Purpose: Provide Assign VlanTag Request Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class AssignVlanTagRequest {\r
+       \r
+       private @Valid List<AssignVlanTagRequestInput> input = new ArrayList<AssignVlanTagRequestInput>();\r
+\r
+         /**\r
+          **/\r
+         public AssignVlanTagRequest input(List<AssignVlanTagRequestInput> input) {\r
+           this.input = input;\r
+           return this;\r
+         }\r
+\r
+         \r
+         @ApiModelProperty(value = "")\r
+         @JsonProperty("input")\r
+         public List<AssignVlanTagRequestInput> getInput() {\r
+           return input;\r
+         }\r
+         public void setInput(List<AssignVlanTagRequestInput> input) {\r
+           this.input = input;\r
+         }\r
+\r
+\r
+         @Override\r
+         public boolean equals(java.lang.Object o) {\r
+           if (this == o) {\r
+             return true;\r
+           }\r
+           if (o == null || getClass() != o.getClass()) {\r
+             return false;\r
+           }\r
+           AssignVlanTagRequest assignVlanTagRequest = (AssignVlanTagRequest) o;\r
+           return Objects.equals(input, assignVlanTagRequest.input);\r
+         }\r
+\r
+         @Override\r
+         public int hashCode() {\r
+           return Objects.hash(input);\r
+         }\r
+\r
+         @Override\r
+         public String toString() {\r
+           StringBuilder sb = new StringBuilder();\r
+           sb.append("class AssignVlanTagRequest {\n");\r
+           \r
+           sb.append("    input: ").append(toIndentedString(input)).append("\n");\r
+           sb.append("}");\r
+           return sb.toString();\r
+         }\r
+\r
+         /**\r
+          * Convert the given object to string with each line indented by 4 spaces\r
+          * (except the first line).\r
+          */\r
+         private String toIndentedString(java.lang.Object o) {\r
+           if (o == null) {\r
+             return "null";\r
+           }\r
+           return o.toString().replace("\n", "\n    ");\r
+         }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java
new file mode 100644 (file)
index 0000000..682ba12
--- /dev/null
@@ -0,0 +1,186 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import javax.validation.Valid;\r
+import java.util.Objects;\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * AssignVlanTagRequestInput.java Purpose: Provide Assign VlanTag Request Input Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class AssignVlanTagRequestInput {\r
+       private @Valid String policyInstanceName = null;\r
+       private @Valid String resourceName = null;\r
+       private @Valid String resourceValue = null;\r
+       private @Valid String scopeId = null;\r
+       private @Valid String key = null;\r
+       private @Valid String vlanType = null;\r
+\r
+\r
+       public AssignVlanTagRequestInput policyInstanceName(String policyInstanceName) {\r
+               this.policyInstanceName = policyInstanceName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("policy-instance-name")\r
+       public String getPolicyInstanceName() {\r
+               return policyInstanceName;\r
+       }\r
+\r
+       public void setPolicyInstanceName(String policyInstanceName) {\r
+               this.policyInstanceName = policyInstanceName;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagRequestInput resourceName(String resourceName) {\r
+               this.resourceName = resourceName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("resource-name")\r
+       public String getResourceName() {\r
+               return resourceName;\r
+       }\r
+\r
+       public void setResourceName(String resourceName) {\r
+               this.resourceName = resourceName;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagRequestInput resourceValue(String resourceValue) {\r
+               this.resourceValue = resourceValue;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("resource-value")\r
+       public String getResourceValue() {\r
+               return resourceValue;\r
+       }\r
+\r
+       public void setResourceValue(String resourceValue) {\r
+               this.resourceValue = resourceValue;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagRequestInput scopeId(String scopeId) {\r
+               this.scopeId = scopeId;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("scope-id")\r
+       public String getScopeId() {\r
+               return scopeId;\r
+       }\r
+\r
+       public void setScopeId(String scopeId) {\r
+               this.scopeId = scopeId;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagRequestInput key(String key) {\r
+               this.key = key;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("key")\r
+       public String getKey() {\r
+               return key;\r
+       }\r
+\r
+       public void setKey(String key) {\r
+               this.key = key;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagRequestInput vlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlan-type")\r
+       public String getVlanType() {\r
+               return vlanType;\r
+       }\r
+\r
+       public void setVlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               AssignVlanTagRequestInput assignVlanTagRequestInput = (AssignVlanTagRequestInput) o;\r
+               return Objects.equals(policyInstanceName, assignVlanTagRequestInput.policyInstanceName)\r
+                               && Objects.equals(resourceName, assignVlanTagRequestInput.resourceName)\r
+                               && Objects.equals(resourceValue, assignVlanTagRequestInput.resourceValue)\r
+                               && Objects.equals(scopeId, assignVlanTagRequestInput.scopeId)\r
+                               && Objects.equals(key, assignVlanTagRequestInput.key)\r
+                               && Objects.equals(vlanType, assignVlanTagRequestInput.vlanType);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(policyInstanceName, resourceName, resourceValue, scopeId, key, vlanType);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class AssignVlanTagRequestInput {\n");\r
+\r
+               sb.append("    policyInstanceName: ").append(toIndentedString(policyInstanceName)).append("\n");\r
+               sb.append("    resourceName: ").append(toIndentedString(resourceName)).append("\n");\r
+               sb.append("    resourceValue: ").append(toIndentedString(resourceValue)).append("\n");\r
+               sb.append("    scopeId: ").append(toIndentedString(scopeId)).append("\n");\r
+               sb.append("    key: ").append(toIndentedString(key)).append("\n");\r
+               sb.append("    vlanType: ").append(toIndentedString(vlanType)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java
new file mode 100644 (file)
index 0000000..5b5ea5c
--- /dev/null
@@ -0,0 +1,135 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * AssignVlanTagResponse.java Purpose: Provide Assign VlanTag Response Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class AssignVlanTagResponse {\r
+\r
+       private @Valid List<AssignVlanTagResponseOutput> output = new ArrayList<AssignVlanTagResponseOutput>();\r
+       private @Valid Integer errorCode = null;\r
+       private @Valid String errorMessage = null;\r
+       \r
+       public AssignVlanTagResponse() {}\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponse output(List<AssignVlanTagResponseOutput> output) {\r
+               this.output = output;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("output")\r
+       public List<AssignVlanTagResponseOutput> getOutput() {\r
+               return output;\r
+       }\r
+\r
+       public void setOutput(List<AssignVlanTagResponseOutput> output) {\r
+               this.output = output;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponse errorCode(Integer errorCode) {\r
+               this.errorCode = errorCode;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("error-code")\r
+       public Integer getErrorCode() {\r
+               return errorCode;\r
+       }\r
+\r
+       public void setErrorCode(Integer errorCode) {\r
+               this.errorCode = errorCode;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponse errorMessage(String errorMessage) {\r
+               this.errorMessage = errorMessage;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("error-message")\r
+       public String getErrorMessage() {\r
+               return errorMessage;\r
+       }\r
+\r
+       public void setErrorMessage(String errorMessage) {\r
+               this.errorMessage = errorMessage;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               AssignVlanTagResponse assignVlanTagResponse = (AssignVlanTagResponse) o;\r
+               return Objects.equals(errorCode, assignVlanTagResponse.errorCode)\r
+                               && Objects.equals(errorMessage, assignVlanTagResponse.errorMessage)\r
+                               && Objects.equals(output, assignVlanTagResponse.output);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(output, errorCode, errorMessage);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class AssignVlanTagResponse {\n");\r
+\r
+               sb.append("    output: ").append(toIndentedString(output)).append("\n");\r
+               sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");\r
+               sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java
new file mode 100644 (file)
index 0000000..b8b186b
--- /dev/null
@@ -0,0 +1,153 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * AssignVlanTagResponseOutput.java Purpose: Provide Assign VlanTag Response Output Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class AssignVlanTagResponseOutput {\r
+\r
+       private @Valid String resourceName = null;\r
+       private @Valid String resourceValue = null;\r
+       private @Valid String resourceVlanRole = null;\r
+       private @Valid List<VlanTag> storedElements = new ArrayList<VlanTag>();\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponseOutput resourceName(String resourceName) {\r
+               this.resourceName = resourceName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("resource-name")\r
+       public String getResourceName() {\r
+               return resourceName;\r
+       }\r
+\r
+       public void setResourceName(String resourceName) {\r
+               this.resourceName = resourceName;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponseOutput resourceValue(String resourceValue) {\r
+               this.resourceValue = resourceValue;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("resource-value")\r
+       public String getResourceValue() {\r
+               return resourceValue;\r
+       }\r
+\r
+       public void setResourceValue(String resourceValue) {\r
+               this.resourceValue = resourceValue;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponseOutput resourceVlanRole(String resourceVlanRole) {\r
+               this.resourceVlanRole = resourceVlanRole;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("resource-vlan-role")\r
+       public String getResourceVlanRole() {\r
+               return resourceVlanRole;\r
+       }\r
+\r
+       public void setResourceVlanRole(String resourceVlanRole) {\r
+               this.resourceVlanRole = resourceVlanRole;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public AssignVlanTagResponseOutput storedElements(List<VlanTag> storedElements) {\r
+               this.storedElements = storedElements;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("stored-elements")\r
+       public List<VlanTag> getStoredElements() {\r
+               return storedElements;\r
+       }\r
+\r
+       public void setStoredElements(List<VlanTag> storedElements) {\r
+               this.storedElements = storedElements;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               AssignVlanTagResponseOutput assignVlanTagResponseOutput = (AssignVlanTagResponseOutput) o;\r
+               return Objects.equals(resourceName, assignVlanTagResponseOutput.resourceName)\r
+                               && Objects.equals(resourceValue, assignVlanTagResponseOutput.resourceValue)\r
+                               && Objects.equals(resourceVlanRole, assignVlanTagResponseOutput.resourceVlanRole)\r
+                               && Objects.equals(storedElements, assignVlanTagResponseOutput.storedElements);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(resourceName, resourceValue, resourceVlanRole, storedElements);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class AssignVlanTagResponseOutput {\n");\r
+\r
+               sb.append("    resourceName: ").append(toIndentedString(resourceName)).append("\n");\r
+               sb.append("    resourceValue: ").append(toIndentedString(resourceValue)).append("\n");\r
+               sb.append("    resourceVlanRole: ").append(toIndentedString(resourceVlanRole)).append("\n");\r
+               sb.append("    storedElements: ").append(toIndentedString(storedElements)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java
new file mode 100644 (file)
index 0000000..d8ea0ec
--- /dev/null
@@ -0,0 +1,39 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+/**\r
+ * PingResponse.java Purpose: Provide VlanTag API Ping Response Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class PingResponse {\r
+    public String getMessage() {\r
+        return message;\r
+    }\r
+\r
+    public void setMessage(String message) {\r
+        this.message = message;\r
+    }\r
+\r
+    private String message;\r
+\r
+    public PingResponse() {\r
+\r
+    }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java
new file mode 100644 (file)
index 0000000..aa2f0ef
--- /dev/null
@@ -0,0 +1,92 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * UnassignVlanTagRequest.java Purpose: Provide Unassign VlanTag Request Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class UnassignVlanTagRequest {\r
+\r
+       private @Valid List<UnassignVlanTagRequestInput> input = new ArrayList<UnassignVlanTagRequestInput>();\r
+\r
+       /**\r
+         **/\r
+       public UnassignVlanTagRequest input(List<UnassignVlanTagRequestInput> input) {\r
+               this.input = input;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("input")\r
+       public List<UnassignVlanTagRequestInput> getInput() {\r
+               return input;\r
+       }\r
+\r
+       public void setInput(List<UnassignVlanTagRequestInput> input) {\r
+               this.input = input;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               UnassignVlanTagRequest unassignVlanTagRequest = (UnassignVlanTagRequest) o;\r
+               return Objects.equals(input, unassignVlanTagRequest.input);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(input);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class UnassignVlanTagRequest {\n");\r
+\r
+               sb.append("    input: ").append(toIndentedString(input)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java
new file mode 100644 (file)
index 0000000..64cc911
--- /dev/null
@@ -0,0 +1,130 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * UnassignVlanTagRequestInput.java Purpose: Provide Unassign VlanTag Request Input Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class UnassignVlanTagRequestInput {\r
+\r
+       private @Valid String policyInstanceName = null;\r
+       private @Valid String vlanType = null;\r
+       private @Valid String key = null;\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagRequestInput policyInstanceName(String policyInstanceName) {\r
+               this.policyInstanceName = policyInstanceName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("policy-instance-name")\r
+       public String getPolicyInstanceName() {\r
+               return policyInstanceName;\r
+       }\r
+\r
+       public void setPolicyInstanceName(String policyInstanceName) {\r
+               this.policyInstanceName = policyInstanceName;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagRequestInput vlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlan-type")\r
+       public String getVlanType() {\r
+               return vlanType;\r
+       }\r
+\r
+       public void setVlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagRequestInput key(String key) {\r
+               this.key = key;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("key")\r
+       public String getKey() {\r
+               return key;\r
+       }\r
+\r
+       public void setKey(String key) {\r
+               this.key = key;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               UnassignVlanTagRequestInput unassignVlanTagRequestInput = (UnassignVlanTagRequestInput) o;\r
+               return Objects.equals(policyInstanceName, unassignVlanTagRequestInput.policyInstanceName)\r
+                               && Objects.equals(vlanType, unassignVlanTagRequestInput.vlanType)\r
+                               && Objects.equals(key, unassignVlanTagRequestInput.key);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(policyInstanceName, vlanType, key);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class UnassignVlanTagRequestInput {\n");\r
+\r
+               sb.append("    policyInstanceName: ").append(toIndentedString(policyInstanceName)).append("\n");\r
+               sb.append("    vlanType: ").append(toIndentedString(vlanType)).append("\n");\r
+               sb.append("    key: ").append(toIndentedString(key)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java
new file mode 100644 (file)
index 0000000..2bc95da
--- /dev/null
@@ -0,0 +1,131 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * UnassignVlanTagResponse.java Purpose: Provide Unassign VlanTag Response Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class UnassignVlanTagResponse {\r
+       private @Valid List<UnassignVlanTagResponseOutput> output = new ArrayList<UnassignVlanTagResponseOutput>();\r
+       private @Valid Integer errorCode = null;\r
+       private @Valid String errorMessage = null;\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponse output(List<UnassignVlanTagResponseOutput> output) {\r
+               this.output = output;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("output")\r
+       public List<UnassignVlanTagResponseOutput> getOutput() {\r
+               return output;\r
+       }\r
+\r
+       public void setOutput(List<UnassignVlanTagResponseOutput> output) {\r
+               this.output = output;\r
+       }\r
+       \r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponse errorCode(Integer errorCode) {\r
+               this.errorCode = errorCode;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("error-code")\r
+       public Integer getErrorCode() {\r
+               return errorCode;\r
+       }\r
+\r
+       public void setErrorCode(Integer errorCode) {\r
+               this.errorCode = errorCode;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponse errorMessage(String errorMessage) {\r
+               this.errorMessage = errorMessage;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("error-message")\r
+       public String getErrorMessage() {\r
+               return errorMessage;\r
+       }\r
+\r
+       public void setErrorMessage(String errorMessage) {\r
+               this.errorMessage = errorMessage;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               UnassignVlanTagResponse unassignVlanTagResponse = (UnassignVlanTagResponse) o;\r
+               return Objects.equals(output, unassignVlanTagResponse.output)\r
+                               && Objects.equals(errorCode, unassignVlanTagResponse.errorCode)\r
+                               && Objects.equals(errorMessage, unassignVlanTagResponse.errorMessage);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(output, errorCode, errorMessage);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class UnassignVlanTagResponse {\n");\r
+\r
+               sb.append("    output: ").append(toIndentedString(output)).append("\n");\r
+               sb.append("    errorCode: ").append(toIndentedString(errorCode)).append("\n");\r
+               sb.append("    errorMessage: ").append(toIndentedString(errorMessage)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java
new file mode 100644 (file)
index 0000000..65420b9
--- /dev/null
@@ -0,0 +1,131 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * UnassignVlanTagResponseOutput.java Purpose: Provide Unassign VlanTag Response Output Model\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class UnassignVlanTagResponseOutput {\r
+       private @Valid String vlanType = null;\r
+       private @Valid String key = null;\r
+       private @Valid String vlantagName = null;\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponseOutput vlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlan-type")\r
+       public String getVlanType() {\r
+               return vlanType;\r
+       }\r
+\r
+       public void setVlanType(String vlanType) {\r
+               this.vlanType = vlanType;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponseOutput key(String key) {\r
+               this.key = key;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("key")\r
+       public String getKey() {\r
+               return key;\r
+       }\r
+\r
+       public void setKey(String key) {\r
+               this.key = key;\r
+       }\r
+       \r
+       /**\r
+        **/\r
+       public UnassignVlanTagResponseOutput vlantagName(String vlantagName) {\r
+               this.vlantagName = vlantagName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlantag-name")\r
+       public String getVlantagName() {\r
+               return vlantagName;\r
+       }\r
+\r
+       public void setVlantagName(String vlantagName) {\r
+               this.vlantagName = vlantagName;\r
+       }\r
+\r
+       \r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               UnassignVlanTagResponseOutput unassignVlanTagResponseOutput = (UnassignVlanTagResponseOutput) o;\r
+               return Objects.equals(vlanType, unassignVlanTagResponseOutput.vlanType)\r
+                               && Objects.equals(key, unassignVlanTagResponseOutput.key)\r
+                               && Objects.equals(vlantagName, unassignVlanTagResponseOutput.vlantagName);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(vlanType, key, vlantagName);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class UnassignVlanTagResponseOutput {\n");\r
+\r
+               sb.append("    vlanType: ").append(toIndentedString(vlanType)).append("\n");\r
+               sb.append("    key: ").append(toIndentedString(key)).append("\n");\r
+               sb.append("    vlantagName: ").append(toIndentedString(vlantagName)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java
new file mode 100644 (file)
index 0000000..1a207fd
--- /dev/null
@@ -0,0 +1,149 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.model;\r
+\r
+import java.util.Objects;\r
+\r
+import javax.validation.Valid;\r
+\r
+import com.fasterxml.jackson.annotation.JsonProperty;\r
+\r
+import io.swagger.annotations.ApiModelProperty;\r
+\r
+/**\r
+ * VlanTag.java Purpose: Provide VlanTag Model for the Assign Response Output\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+public class VlanTag {\r
+\r
+       private @Valid String vlanUuid = null;\r
+       private @Valid String vlantagName = null;\r
+       private @Valid String vlantagValue = null;\r
+       private @Valid String elementVlanRole = null;\r
+\r
+       /**\r
+        **/\r
+       public VlanTag vlanUuid(String vlanUuid) {\r
+               this.vlanUuid = vlanUuid;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlan-uuid")\r
+       public String getVlanUuid() {\r
+               return vlanUuid;\r
+       }\r
+\r
+       public void setVlanUuid(String vlanUuid) {\r
+               this.vlanUuid = vlanUuid;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public VlanTag vlantagName(String vlantagName) {\r
+               this.vlantagName = vlantagName;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlantag-name")\r
+       public String getVlantagName() {\r
+               return vlantagName;\r
+       }\r
+\r
+       public void setVlantagName(String vlantagName) {\r
+               this.vlantagName = vlantagName;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public VlanTag vlantagValue(String vlantagValue) {\r
+               this.vlantagValue = vlantagValue;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("vlantag-value")\r
+       public String getVlantagValue() {\r
+               return vlantagValue;\r
+       }\r
+\r
+       public void setVlantagValue(String vlantagValue) {\r
+               this.vlantagValue = vlantagValue;\r
+       }\r
+\r
+       /**\r
+        **/\r
+       public VlanTag elementVlanRole(String elementVlanRole) {\r
+               this.elementVlanRole = elementVlanRole;\r
+               return this;\r
+       }\r
+\r
+       @ApiModelProperty(value = "")\r
+       @JsonProperty("element-vlan-role")\r
+       public String getElementVlanRole() {\r
+               return elementVlanRole;\r
+       }\r
+\r
+       public void setElementVlanRole(String elementVlanRole) {\r
+               this.elementVlanRole = elementVlanRole;\r
+       }\r
+\r
+       @Override\r
+       public boolean equals(java.lang.Object o) {\r
+               if (this == o) {\r
+                       return true;\r
+               }\r
+               if (o == null || getClass() != o.getClass()) {\r
+                       return false;\r
+               }\r
+               VlanTag vlanTag = (VlanTag) o;\r
+               return Objects.equals(vlanUuid, vlanTag.vlanUuid) && Objects.equals(vlantagName, vlanTag.vlantagName)\r
+                               && Objects.equals(vlantagValue, vlanTag.vlantagValue)\r
+                               && Objects.equals(elementVlanRole, vlanTag.elementVlanRole);\r
+       }\r
+\r
+       @Override\r
+       public int hashCode() {\r
+               return Objects.hash(vlanUuid, vlantagName, vlantagValue, elementVlanRole);\r
+       }\r
+\r
+       @Override\r
+       public String toString() {\r
+               StringBuilder sb = new StringBuilder();\r
+               sb.append("class VlanTag {\n");\r
+\r
+               sb.append("    vlanUuid: ").append(toIndentedString(vlanUuid)).append("\n");\r
+               sb.append("    vlantagName: ").append(toIndentedString(vlantagName)).append("\n");\r
+               sb.append("    vlantagValue: ").append(toIndentedString(vlantagValue)).append("\n");\r
+               sb.append("    elementVlanRole: ").append(toIndentedString(elementVlanRole)).append("\n");\r
+               sb.append("}");\r
+               return sb.toString();\r
+       }\r
+\r
+       /**\r
+        * Convert the given object to string with each line indented by 4 spaces\r
+        * (except the first line).\r
+        */\r
+       private String toIndentedString(java.lang.Object o) {\r
+               if (o == null) {\r
+                       return "null";\r
+               }\r
+               return o.toString().replace("\n", "\n    ");\r
+       }\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java
new file mode 100644 (file)
index 0000000..800346a
--- /dev/null
@@ -0,0 +1,81 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.service;\r
+\r
+import javax.validation.Valid;\r
+import javax.ws.rs.Consumes;\r
+import javax.ws.rs.GET;\r
+import javax.ws.rs.POST;\r
+import javax.ws.rs.Path;\r
+import javax.ws.rs.PathParam;\r
+import javax.ws.rs.Produces;\r
+import javax.ws.rs.core.MediaType;\r
+\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse;\r
+\r
+/**\r
+ * VlantagApiService.java Purpose: Provide Vlantag Assignment & UnAssignment\r
+ * APIs interface for VNFs\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@Path("/")\r
+public interface VlantagApiService {\r
+\r
+    /**\r
+     * This is a assignVlanTag service to assign Vlantags based on the\r
+     * AssignVlanTagRequest and Policy instance.\r
+     * \r
+     * @param AssignVlanTagRequest\r
+     * @return AssignVlanTagResponse\r
+     */\r
+    @POST\r
+    @Path("/v1/assign")\r
+    @Consumes({ MediaType.APPLICATION_JSON })\r
+    @Produces({ MediaType.APPLICATION_JSON })\r
+    AssignVlanTagResponse assignVlanTag(@Valid AssignVlanTagRequest body) throws VlantagApiException, Exception;\r
+\r
+    /**\r
+     * This is a unassignVlanTag service to unassign Vlantags based on the\r
+     * UnassignVlanTagRequest and Policy instance.\r
+     * \r
+     * @param UnassignVlanTagRequest\r
+     * @return UnassignVlanTagResponse\r
+     */\r
+    @POST\r
+    @Path("/v1/unassign")\r
+    @Consumes({ MediaType.APPLICATION_JSON })\r
+    @Produces({ MediaType.APPLICATION_JSON })\r
+    UnassignVlanTagResponse unassignVlanTag(@Valid UnassignVlanTagRequest body) throws VlantagApiException, Exception;\r
+\r
+    /**\r
+     * This is a ping service to check the Vlantag Api is Up and running.\r
+     * \r
+     * @param name\r
+     * @return PingResponse\r
+     */\r
+    @GET\r
+    @Path("/v1/ping/{name}")\r
+    @Produces(MediaType.APPLICATION_JSON)\r
+    PingResponse getPing(@PathParam("name") String name);\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java
new file mode 100644 (file)
index 0000000..3b79cdc
--- /dev/null
@@ -0,0 +1,561 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.service;\r
+\r
+import java.util.ArrayList;\r
+import java.util.Date;\r
+import java.util.List;\r
+import java.util.Optional;\r
+import java.util.UUID;\r
+\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.AllowedRanges;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.Elements;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.ResourceModel;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequestInput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponseOutput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequestInput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponseOutput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.VlanTag;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm.PolicyManagerClient;\r
+import org.onap.ccsdk.sli.adaptors.ra.ResourceAllocator;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceEntity;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceRequest;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceResponse;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceTarget;\r
+import org.onap.ccsdk.sli.adaptors.rm.data.AllocationStatus;\r
+import org.onap.ccsdk.sli.adaptors.rm.data.Range;\r
+import org.onap.ccsdk.sli.adaptors.rm.data.ResourceType;\r
+import org.onap.ccsdk.sli.adaptors.util.str.StrUtil;\r
+\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.stereotype.Service;\r
+\r
+/**\r
+ * VlantagApiServiceImpl.java Purpose: Provide Vlantag Assignment & UnAssignment\r
+ * APIs service implementation for VNFs\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@Service\r
+public class VlantagApiServiceImpl implements VlantagApiService {\r
+\r
+       private static final VlantagApiService INSTANCE = new VlantagApiServiceImpl();\r
+       private static final Logger log = LoggerFactory.getLogger(VlantagApiServiceImpl.class);\r
+       private static final String BEGIN_SQUAREBRACKET_RC = "#BSB#";\r
+       private static final String END_SQUAREBRACKET_RC = "#ESB#";\r
+\r
+       @Autowired\r
+       private ResourceAllocator resourceAllocator;\r
+       @Autowired\r
+    private PolicyManagerClient policyClient;\r
+\r
+       public static VlantagApiService getInstance() {\r
+               return INSTANCE;\r
+       }\r
+\r
+       /**\r
+     * This is a assignVlanTag service implementation to assign Vlantags based on the\r
+     * AssignVlanTagRequest and Policy instance.\r
+     * \r
+     * @param AssignVlanTagRequest\r
+     * @return AssignVlanTagResponse\r
+     */\r
+       @Override\r
+       public AssignVlanTagResponse assignVlanTag(AssignVlanTagRequest request) throws Exception {\r
+               List<AssignVlanTagResponseOutput> outputList = new ArrayList<>();\r
+\r
+               try {\r
+                       validateRequest(request);\r
+                       List<AssignVlanTagRequestInput> vlanTagRequests = request.getInput();\r
+\r
+                       List<AssignVlanTagRequestInput> reservedResources = new ArrayList<>();\r
+\r
+                       for (AssignVlanTagRequestInput input : vlanTagRequests) {\r
+                               log.info("PolicyManagerClient called..for policy : {}", input.getPolicyInstanceName());\r
+\r
+                               List<ResourceModel> resourceModels = policyClient.getPolicy(input.getPolicyInstanceName());\r
+                               ResourceModel model = validate(resourceModels, input);\r
+                               List<ResourceResponse> rl = new ArrayList<>();\r
+\r
+                               for (Elements elements : model.getElements()) {\r
+\r
+                                       ResourceEntity re = new ResourceEntity();\r
+                                       ResourceTarget rt = new ResourceTarget();\r
+                                       ResourceRequest rr = new ResourceRequest();\r
+                                       List<ResourceResponse> rsList = new ArrayList<>();\r
+\r
+                                       prepareResourceAllocatorObjects(input, model, elements, re, rt, rr);\r
+\r
+                                       if (resourceAllocator != null) {\r
+                                               AllocationStatus status = resourceAllocator.reserve(re, rt, rr, rsList);\r
+\r
+                                               if (AllocationStatus.Success.equals(status))\r
+                                                       rl.addAll(rsList);\r
+                                               else {\r
+                                                       rollbackVlanTags(reservedResources);\r
+                                                       throw new VlantagApiException(\r
+                                                                       "Failed to reserve VlanTags for Element : {}. " + elements.getVlantagName()\r
+                                                                                       + ". Rolling back vlantags for other elements (if any).");\r
+                                               }\r
+                                       } else\r
+                                               throw new VlantagApiException(\r
+                                                               "ResourceAllocator not available. Failed to Assign VlanTags for Element : "\r
+                                                                               + elements.getVlantagName()\r
+                                                                               + ". Rolling back vlantags for other elements (if any).");\r
+\r
+                               }\r
+                               reservedResources.add(input);\r
+                               outputList.add(prepareVlanTagResponse(input, model, rl));\r
+                       }\r
+\r
+               } catch (Exception e) {\r
+                       log.error("Exception : " + e.getMessage(), e);\r
+\r
+                       AssignVlanTagResponse response = new AssignVlanTagResponse();\r
+                       response.setErrorCode(500);\r
+                       response.setErrorMessage(e.getMessage());\r
+                       return response;\r
+               }\r
+\r
+               AssignVlanTagResponse response = new AssignVlanTagResponse();\r
+               response.setErrorCode(200);\r
+               response.setErrorMessage("Success");\r
+               response.setOutput(outputList);\r
+               return response;\r
+       }\r
+\r
+       private void prepareResourceAllocatorObjects(AssignVlanTagRequestInput input, ResourceModel model, Elements element,\r
+                       ResourceEntity re, ResourceTarget rt, ResourceRequest rr) throws VlantagApiException {\r
+               log.info("Preparing RA Objects for Vlan Type : " + input.getVlanType() + " and Element : "\r
+                               + element.getVlantagName());\r
+               re.resourceEntityId = input.getKey();\r
+               re.resourceEntityType = model.getKeyType() == null ? "DEFAULT" : model.getKeyType();\r
+               re.resourceEntityVersion = "1";\r
+\r
+               rt.resourceTargetId = input.getScopeId();\r
+               rt.resourceTargetType = model.getScope() == null ? "DEFAULT" : model.getScope();\r
+\r
+               rr.resourceName = input.getVlanType();\r
+               rr.serviceModel = input.getPolicyInstanceName();\r
+               rr.endPointPosition = element.getVlantagName();\r
+               rr.resourceType = ResourceType.Range;\r
+               rr.applicationId = "SDNC";\r
+               rr.rangeMaxOverride = -1;\r
+               rr.rangeMinOverride = -1;\r
+\r
+               List<Range> rangeList = new ArrayList<>();\r
+               for (AllowedRanges allowedRange : element.getAllowedRanges()) {\r
+                       Range range = new Range();\r
+\r
+                       if (allowedRange.getMin() != null && !allowedRange.getMin().isEmpty())\r
+                               range.min = Integer.parseInt(allowedRange.getMin());\r
+\r
+                       if (allowedRange.getMax() != null && !allowedRange.getMax().isEmpty())\r
+                               range.max = Integer.parseInt(allowedRange.getMax());\r
+\r
+                       rangeList.add(range);\r
+               }\r
+\r
+               rr.rangeOverrideList = rangeList;\r
+\r
+               String resourceValue = resolveResourceElementValue(input, model, element);\r
+               if (resourceValue != null) {\r
+                       rr.rangeRequestedNumbers = resourceValue; /* Manually provided values */\r
+\r
+                       /*\r
+                        * If the override flag is TRUE, then add the resource value also in the range,\r
+                        * so it will ignore the current range min-max in the policy. Persist in the DB\r
+                        * if available else Fail.\r
+                        */\r
+                       if (element.getOverwrite() != null && element.getOverwrite().equalsIgnoreCase("TRUE")) {\r
+                               Range range = new Range();\r
+                               range.min = Integer.parseInt(resourceValue);\r
+                               rangeList.add(range);\r
+                       }\r
+               }\r
+\r
+               StrUtil.info(log, re);\r
+               StrUtil.info(log, rt);\r
+               StrUtil.info(log, rr);\r
+\r
+       }\r
+\r
+       protected String resolveResourceElementValue(AssignVlanTagRequestInput input, ResourceModel model, Elements element)\r
+                       throws VlantagApiException {\r
+               String recipe = trimBrackets(model.getResourceResolutionRecipe().trim());\r
+\r
+               if (input.getResourceValue() != null && !input.getResourceValue().trim().isEmpty()\r
+                               && !input.getResourceValue().contains("$")) {\r
+                       log.info("Resource Value : " + input.getResourceValue());\r
+                       String resourceValue = trimBrackets(input.getResourceValue());\r
+\r
+                       String[] vlantagNames = recipe.split(",");\r
+                       String[] resourceValues = resourceValue.split(",");\r
+\r
+                       try {\r
+                               for (int i = 0; i < vlantagNames.length; i++) {\r
+                                       if (vlantagNames[i].trim().equalsIgnoreCase(element.getVlantagName().trim()))\r
+                                               return resourceValues[i].trim();\r
+                               }\r
+                       } catch (IndexOutOfBoundsException e) {\r
+                               throw new VlantagApiException("No Matching Resource Value found from Recipe : \""\r
+                                               + model.getResourceResolutionRecipe() + "\" for Vlantag Name : " + element.getVlantagName());\r
+                       }\r
+\r
+               }\r
+               return null;\r
+       }\r
+\r
+       ResourceModel validate(List<ResourceModel> resourceModels, AssignVlanTagRequestInput input)\r
+                       throws VlantagApiException {\r
+               ResourceModel targetModel = null;\r
+               if (resourceModels != null && !resourceModels.isEmpty()) {\r
+                       for (ResourceModel model : resourceModels) {\r
+                               if (model.getVlanType().equals(input.getVlanType())) {\r
+                                       targetModel = model;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       validateModel(targetModel, input);\r
+               } else\r
+                       throw new VlantagApiException("No Resource Models available in Policy Manager for Policy Instance Name : "\r
+                                       + input.getPolicyInstanceName());\r
+               return targetModel;\r
+       }\r
+\r
+       void validateModel(ResourceModel model, AssignVlanTagRequestInput input) throws VlantagApiException {\r
+\r
+               if (model == null)\r
+                       throw new VlantagApiException(\r
+                                       "No Matching Policy Resource Model found for Vlan Type : " + input.getVlanType());\r
+               else {\r
+                       if (model.getResourceResolutionRecipe() == null || model.getResourceResolutionRecipe().isEmpty())\r
+                               throw new VlantagApiException(\r
+                                               "Resource Resolution Recipe is null in Resource Model for Vlan Type : " + input.getVlanType());\r
+\r
+                       if (model.getScope() == null || model.getScope().isEmpty())\r
+                               throw new VlantagApiException("Scope is null in Resource Model for Vlan Type : " + input.getVlanType());\r
+\r
+                       List<Elements> elements = model.getElements();\r
+                       validateElements(elements, input);\r
+               }\r
+\r
+       }\r
+\r
+       void validateElements(List<Elements> elements, AssignVlanTagRequestInput input) throws VlantagApiException {\r
+               if (elements != null && !elements.isEmpty()) {\r
+                       for (Elements element : elements) {\r
+                               if (element.getVlantagName() == null)\r
+                                       throw new VlantagApiException(\r
+                                                       "Vlantag Name missing for Element in Resource Model Policy for Vlan Type : "\r
+                                                                       + input.getVlanType());\r
+                               if (element.getAllowedRanges() == null || element.getAllowedRanges().isEmpty())\r
+                                       throw new VlantagApiException(\r
+                                                       "Allowed Ranges missing for Element in Resource Model Policy for Vlan Type : "\r
+                                                                       + input.getVlanType());\r
+                       }\r
+               } else\r
+                       throw new VlantagApiException(\r
+                                       "No Vlantag Elements found in Resource Model Policy for Vlan Type : " + input.getVlanType());\r
+\r
+       }\r
+\r
+       PolicyManagerClient getPolicyManagerClient() {\r
+               return new PolicyManagerClient();\r
+       }\r
+\r
+       void validateRequest(AssignVlanTagRequest request) throws VlantagApiException {\r
+               if (request == null)\r
+                       throw new VlantagApiException("VlanTag Assign Request is null.");\r
+\r
+               List<AssignVlanTagRequestInput> inputList = request.getInput();\r
+\r
+               if (inputList == null || inputList.isEmpty())\r
+                       throw new VlantagApiException("VlanTag Assign Request Input is null or empty.");\r
+\r
+               for (AssignVlanTagRequestInput input : inputList) {\r
+                       if (input.getPolicyInstanceName() == null || input.getPolicyInstanceName().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Assign Request policy-instance-name is null.");\r
+\r
+                       if (input.getVlanType() == null || input.getVlanType().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Assign Request vlan-type is null.");\r
+\r
+                       if (input.getScopeId() == null || input.getScopeId().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Assign Request scope-id is null.");\r
+\r
+                       if (input.getKey() == null || input.getKey().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Assign Request key is null.");\r
+               }\r
+\r
+       }\r
+\r
+       private AssignVlanTagResponseOutput prepareVlanTagResponse(AssignVlanTagRequestInput input, ResourceModel model,\r
+                       List<ResourceResponse> rl) {\r
+               AssignVlanTagResponseOutput ro = new AssignVlanTagResponseOutput();\r
+               List<VlanTag> vlanTagList = new ArrayList<>();\r
+\r
+               if (rl != null && !rl.isEmpty()) {\r
+                       ro.setResourceName(input.getResourceName());\r
+                       ro.setResourceValue(resolveRecipe(model, rl));\r
+                       ro.setResourceVlanRole(model.getResourceVlanRole());\r
+                       if (model.getDataStore() != null && !model.getDataStore().isEmpty()) {\r
+                               for (ResourceResponse rr : rl) {\r
+                                       VlanTag tag = new VlanTag();\r
+                                       Optional<Elements> optionalElements = model.getElements().stream()\r
+                                                       .filter(element -> element.getVlantagName().equalsIgnoreCase(rr.endPointPosition))\r
+                                                       .findFirst();\r
+                                       optionalElements.ifPresent(element -> tag.setElementVlanRole(element.getElementVlanRole()));\r
+\r
+                                       tag.setVlanUuid(UUID.randomUUID().toString());\r
+                                       tag.setVlantagName(rr.endPointPosition);\r
+                                       tag.setVlantagValue(rr.resourceAllocated);\r
+                                       vlanTagList.add(tag);\r
+                               }\r
+\r
+                       }\r
+                       ro.setStoredElements(vlanTagList);\r
+               }\r
+\r
+               return ro;\r
+       }\r
+\r
+       protected String resolveRecipe(ResourceModel model, List<ResourceResponse> rl) {\r
+               String recipe = model.getResourceResolutionRecipe().trim();\r
+               String resourceValue = recipe;\r
+\r
+               if (recipe.contains(BEGIN_SQUAREBRACKET_RC)) {\r
+                       recipe = recipe.replace(BEGIN_SQUAREBRACKET_RC, "");\r
+                       resourceValue = resourceValue.replace(BEGIN_SQUAREBRACKET_RC, "[ ");\r
+               }\r
+\r
+               if (recipe.contains(END_SQUAREBRACKET_RC)) {\r
+                       recipe = recipe.replace(END_SQUAREBRACKET_RC, "");\r
+                       resourceValue = resourceValue.replace(END_SQUAREBRACKET_RC, " ]");\r
+               }\r
+\r
+               String[] vlantagNames = recipe.split(",");\r
+\r
+               for (String vlantagName : vlantagNames) {\r
+                       for (ResourceResponse rr : rl) {\r
+                               if (vlantagName.trim().equalsIgnoreCase(rr.endPointPosition)) {\r
+                                       resourceValue = resourceValue.replace(vlantagName, " " + rr.resourceAllocated);\r
+                                       break;\r
+                               }\r
+                       }\r
+               }\r
+\r
+               log.info(resourceValue);\r
+\r
+               return resourceValue;\r
+       }\r
+\r
+    private void rollbackVlanTags(List<AssignVlanTagRequestInput> reservedResources) throws Exception {\r
+        UnassignVlanTagRequest unassignRequest = new UnassignVlanTagRequest();\r
+        List<UnassignVlanTagRequestInput> inputList = new ArrayList<>();\r
+\r
+        if (reservedResources != null && !reservedResources.isEmpty()) {\r
+            reservedResources.forEach(assignReqInput -> {\r
+\r
+                UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+                input.setVlanType(assignReqInput.getVlanType());\r
+                input.setKey(assignReqInput.getKey());\r
+                input.setPolicyInstanceName(assignReqInput.getPolicyInstanceName());\r
+                inputList.add(input);\r
+            });\r
+            unassignRequest.setInput(inputList);\r
+            unassignVlanTag(unassignRequest);\r
+        }\r
+\r
+    }\r
+\r
+       /**\r
+     * This is a unassignVlanTag service implementation to unassign Vlantags based on the\r
+     * UnassignVlanTagRequest and Policy instance.\r
+     * \r
+     * @param UnassignVlanTagRequest\r
+     * @return UnassignVlanTagResponse\r
+     */\r
+       @Override\r
+       public UnassignVlanTagResponse unassignVlanTag(UnassignVlanTagRequest request) throws Exception {\r
+               UnassignVlanTagResponse response = new UnassignVlanTagResponse();\r
+               List<UnassignVlanTagResponseOutput> output = new ArrayList<>();\r
+\r
+               try {\r
+                       validateRequest(request);\r
+                       List<UnassignVlanTagRequestInput> vlanTagRequests = request.getInput();\r
+\r
+                       for (UnassignVlanTagRequestInput input : vlanTagRequests) {\r
+                               List<ResourceModel> resourceModels = policyClient.getPolicy(input.getPolicyInstanceName());\r
+                               ResourceModel model = validate(resourceModels, input);\r
+\r
+                               for (Elements elements : model.getElements()) {\r
+\r
+                                       ResourceEntity re = new ResourceEntity();\r
+                                       re.resourceEntityId = input.getKey();\r
+                                       re.resourceEntityType = model.getKeyType() == null ? "DEFAULT" : model.getKeyType();\r
+                                       re.resourceEntityVersion = "1";\r
+\r
+                                       ResourceRequest rr = new ResourceRequest();\r
+                                       rr.endPointPosition = elements.getVlantagName();\r
+\r
+                                       if (resourceAllocator != null) {\r
+                                               AllocationStatus status = resourceAllocator.release(re, rr);\r
+\r
+                                               if (AllocationStatus.Success.equals(status)) {\r
+                                                       UnassignVlanTagResponseOutput ro = new UnassignVlanTagResponseOutput();\r
+                                                       ro.setKey(input.getKey());\r
+                                                       ro.setVlanType(input.getVlanType());\r
+                                                       ro.setVlantagName(elements.getVlantagName());\r
+                                                       output.add(ro);\r
+                                               } else {\r
+                                                       throw new VlantagApiException(\r
+                                                                       "Failed to release VlanTags for Element : " + elements.getVlantagName() + ".");\r
+                                               }\r
+                                       } else\r
+                                               throw new VlantagApiException(\r
+                                                               "ResourceAllocator not available. Failed to Unassign VlanTags for Element : "\r
+                                                                               + elements.getVlantagName()\r
+                                                                               + ". Rolling back vlantags for other elements (if any).");\r
+                               }\r
+                       }\r
+               } catch (Exception e) {\r
+                       log.error("Exception : " + e.getMessage(), e);\r
+\r
+                       response.setErrorCode(500);\r
+                       response.setErrorMessage(e.getMessage());\r
+                       return response;\r
+               }\r
+\r
+               response.setOutput(output);\r
+               response.setErrorCode(200);\r
+               response.setErrorMessage("Success");\r
+               return response;\r
+       }\r
+\r
+       ResourceModel validate(List<ResourceModel> resourceModels, UnassignVlanTagRequestInput input)\r
+                       throws VlantagApiException {\r
+               ResourceModel targetModel = null;\r
+               if (resourceModels != null && !resourceModels.isEmpty()) {\r
+                       for (ResourceModel model : resourceModels) {\r
+                               if (model.getVlanType().equals(input.getVlanType())) {\r
+                                       targetModel = model;\r
+                                       break;\r
+                               }\r
+                       }\r
+                       validateModel(targetModel, input);\r
+               } else\r
+                       throw new VlantagApiException("No Resource Models available in Policy Manager for Policy Instance Name : "\r
+                                       + input.getPolicyInstanceName());\r
+               return targetModel;\r
+       }\r
+\r
+       void validateModel(ResourceModel model, UnassignVlanTagRequestInput input) throws VlantagApiException {\r
+               if (model == null)\r
+                       throw new VlantagApiException(\r
+                                       "No Matching Policy Resource Model found for Vlan Type : " + input.getVlanType());\r
+               else {\r
+                       if (model.getResourceResolutionRecipe() == null || model.getResourceResolutionRecipe().isEmpty())\r
+                               throw new VlantagApiException(\r
+                                               "Resource Resolution Recipe is null in Resource Model for Vlan Type : " + input.getVlanType());\r
+\r
+                       if (model.getScope() == null || model.getScope().isEmpty())\r
+                               throw new VlantagApiException("Scope is null in Resource Model for Vlan Type : " + input.getVlanType());\r
+\r
+                       List<Elements> elements = model.getElements();\r
+                       validateElements(elements, input);\r
+               }\r
+\r
+       }\r
+\r
+       protected void validateElements(List<Elements> elements, UnassignVlanTagRequestInput input)\r
+                       throws VlantagApiException {\r
+               if (elements != null && !elements.isEmpty()) {\r
+                       for (Elements element : elements) {\r
+                               if (element.getVlantagName() == null)\r
+                                       throw new VlantagApiException(\r
+                                                       "Vlantag Name missing for Element in Resource Model Policy for Vlan Type : "\r
+                                                                       + input.getVlanType());\r
+                       }\r
+               } else\r
+                       throw new VlantagApiException(\r
+                                       "No Vlantag Elements found in Resource Model Policy for Vlan Type : " + input.getVlanType());\r
+\r
+       }\r
+\r
+       protected void validateRequest(UnassignVlanTagRequest request) throws VlantagApiException {\r
+               if (request == null)\r
+                       throw new VlantagApiException("VlanTag Unassign Request is null.");\r
+\r
+               List<UnassignVlanTagRequestInput> inputList = request.getInput();\r
+               if (inputList == null || inputList.isEmpty())\r
+                       throw new VlantagApiException("VlanTag Unassign Request Input is null or empty.");\r
+\r
+               for (UnassignVlanTagRequestInput input : inputList) {\r
+                       if (input.getPolicyInstanceName() == null || input.getPolicyInstanceName().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Unassign Request policy-instance-name is null.");\r
+\r
+                       if (input.getVlanType() == null || input.getVlanType().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Unassign Request resource-name is null.");\r
+\r
+                       if (input.getKey() == null || input.getKey().isEmpty())\r
+                               throw new VlantagApiException("VlanTag Unassign Request key is null.");\r
+               }\r
+\r
+       }\r
+\r
+       /**\r
+     * This is a ping service implementation to check the Vlantag Api is Up and running.\r
+     * \r
+     * @param name\r
+     * @return PingResponse\r
+     */\r
+       @Override\r
+       public PingResponse getPing(String name) {\r
+               PingResponse ping = new PingResponse();\r
+               ping.setMessage("Ping response : " + name + " Time : " + new Date());\r
+               return ping;\r
+       }\r
+       \r
+\r
+       protected void setResourceAllocator(ResourceAllocator ra) {\r
+               this.resourceAllocator = ra;\r
+       }\r
+\r
+       protected String trimBrackets(String recipe) {\r
+               if (recipe != null) {\r
+                       if (recipe.contains(BEGIN_SQUAREBRACKET_RC))\r
+                               recipe = recipe.replace(BEGIN_SQUAREBRACKET_RC, "");\r
+                       if (recipe.contains(END_SQUAREBRACKET_RC))\r
+                               recipe = recipe.replace(END_SQUAREBRACKET_RC, "");\r
+                       if (recipe.contains("["))\r
+                               recipe = recipe.replace("[", "");\r
+                       if (recipe.contains("]"))\r
+                               recipe = recipe.replace("]", "");\r
+               }\r
+               return recipe;\r
+       }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java
new file mode 100644 (file)
index 0000000..ebb5b29
--- /dev/null
@@ -0,0 +1,111 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm;\r
+\r
+import java.io.IOException;\r
+import java.util.HashMap;\r
+import java.util.Iterator;\r
+import java.util.Map;\r
+import java.util.Map.Entry;\r
+\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyData;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+import com.fasterxml.jackson.core.JsonParser;\r
+import com.fasterxml.jackson.databind.DeserializationContext;\r
+import com.fasterxml.jackson.databind.JsonNode;\r
+import com.fasterxml.jackson.databind.ObjectMapper;\r
+import com.fasterxml.jackson.databind.deser.std.StdDeserializer;\r
+import com.fasterxml.jackson.databind.node.ObjectNode;\r
+\r
+/**\r
+ * PolicyDataDeserializer.java Purpose:\r
+ * This is a custom deserializer for "policy-data" element of the response from the Policy management REST call\r
+ * to get Policy details based on a policy name.\r
+ * \r
+ * The response will have different "child tree"s ( policy data)  for different policy names.\r
+ * Each type of child is structurally, syntactically, semantically unique.\r
+ * However, there is no explicit way to identify the right child type in the "policy-data" element itself\r
+ * Hence , the hack is  : assuming there is a unique property in each type of child of Policy-data,\r
+ * look for that property to determine the correct target child type to deserialize to.\r
+ * These unique properties are stored in polymorphicsRegistry and looked up against to find a match\r
+ * If a match is found, use that child type is used.\r
+ */\r
+public class PolicyDataDeserializer extends StdDeserializer<PolicyData> {\r
+\r
+       /**\r
+        * \r
+        */\r
+       private static final long serialVersionUID = 1L;\r
+\r
+       private static Logger log = LoggerFactory.getLogger(PolicyDataDeserializer.class);\r
+\r
+       /*\r
+        * Keep a register of all extensions of PolicyData type by a unique attribute that distringuishes\r
+        * them from one another\r
+        */\r
+       private Map<String, Class<? extends PolicyData>> polymorphicsRegistry =\r
+             new HashMap<>();\r
+\r
+       public PolicyDataDeserializer() {\r
+           super(PolicyData.class);\r
+       }\r
+\r
+       /*\r
+        * Method to add to the registry of PolicyData extensions by their distinguishing attribure\r
+        */\r
+       public void registerExtendersByUniqueness(String uniqueAttribute, Class<? extends PolicyData> policyDataClass) {\r
+           polymorphicsRegistry.put(uniqueAttribute, policyDataClass);\r
+       }\r
+\r
+       @Override\r
+       public PolicyData deserialize(JsonParser jp, DeserializationContext ctxt) \r
+             throws IOException {\r
+               \r
+               PolicyData retVal = null;\r
+           Class<? extends PolicyData> policyDataClass = null;\r
+           \r
+           ObjectMapper mapper = (ObjectMapper) jp.getCodec();\r
+           ObjectNode root = mapper.readTree(jp);\r
+\r
+           //Go through all the elements in this node. If a match is found in the registry of uniqueness,\r
+           // it means we identified what extension of PolicyData we are dealing with. If no match found, return null\r
+           Iterator<Entry<String, JsonNode>> elementsIterator = root.fields();\r
+           while (elementsIterator.hasNext())\r
+           {\r
+             Entry<String, JsonNode> element=elementsIterator.next();\r
+             String name = element.getKey();\r
+             \r
+             if (polymorphicsRegistry.containsKey(name))\r
+             {\r
+               policyDataClass = polymorphicsRegistry.get(name);\r
+               break;\r
+             }\r
+           }\r
+           \r
+           //If we know what child type of PolicyData we are working on , use that class to deserialize this node\r
+           // from its root. If not, throw exception\r
+           if (policyDataClass != null) {\r
+               retVal = mapper.treeToValue(root,  policyDataClass);\r
+           }\r
+           else {\r
+               log.info("No matching Child of PolicyData is present in this node tree");\r
+           }\r
+           return retVal;\r
+       }\r
+}\r
+\r
diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java
new file mode 100644 (file)
index 0000000..2378584
--- /dev/null
@@ -0,0 +1,189 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+package org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm;\r
+\r
+import java.io.IOException;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyConfig;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyData;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyEngineResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.RequestObject;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.ResourceModel;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+import org.springframework.beans.factory.annotation.Autowired;\r
+import org.springframework.core.env.Environment;\r
+import org.springframework.http.HttpEntity;\r
+import org.springframework.http.HttpHeaders;\r
+import org.springframework.http.HttpMethod;\r
+import org.springframework.http.ResponseEntity;\r
+import org.springframework.http.client.BufferingClientHttpRequestFactory;\r
+import org.springframework.http.client.SimpleClientHttpRequestFactory;\r
+import org.springframework.http.converter.HttpMessageConverter;\r
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;\r
+import org.springframework.stereotype.Component;\r
+import org.springframework.web.client.RestClientException;\r
+import org.springframework.web.client.RestTemplate;\r
+\r
+import com.fasterxml.jackson.core.Version;\r
+import com.fasterxml.jackson.databind.DeserializationFeature;\r
+import com.fasterxml.jackson.databind.ObjectMapper;\r
+import com.fasterxml.jackson.databind.module.SimpleModule;\r
+\r
+/**\r
+ * PolicyManagerClient.java Purpose: Client for Policy Manager applications and\r
+ * gets policies from policy manager.\r
+ *\r
+ * @author Saurav Paira\r
+ * @version 1.0\r
+ */\r
+@Component\r
+public class PolicyManagerClient {\r
+\r
+       private static Logger log = LoggerFactory.getLogger(PolicyManagerClient.class);\r
+       \r
+       private static final String CLIENT_AUTH = "ClientAuth";\r
+       private static final String ENVIRONMENT = "Environment";\r
+\r
+    private static final String POLICYMGR_URL_PN = "intf.pdp.policyengine.url";\r
+    private static final String POLICYMGR_AUTHORIZATION_PN = "intf.pdp.policyengine.http.headers.authorization";\r
+    private static final String POLICYMGR_CLIENTAUTH_PN = "intf.pdp.policyengine.http.headers.clientauth";\r
+    private static final String POLICYMGR_ENVIRONMENT_PN = "intf.pdp.policyengine.http.headers.environment";\r
+\r
+       @Autowired\r
+       Environment env;\r
+    /*\r
+     * Main method to call to get the vlan tag selection policy data\r
+     */\r
+\r
+    public synchronized List<ResourceModel> getPolicy(final String policyName) throws VlantagApiException {\r
+        return getPolicyFromPDP(policyName);\r
+    }\r
+\r
+    /*\r
+     * REST call to Policy Manager\r
+     */\r
+       public PolicyEngineResponse[] getConfigUsingPost(RequestObject requestObject) throws VlantagApiException {\r
+\r
+               PolicyEngineResponse[] result = null;\r
+               \r
+               String url = env.getProperty(POLICYMGR_URL_PN);\r
+               log.info("url si : {}", url);\r
+               HttpHeaders headers = getRequestHeaders();\r
+               HttpEntity<RequestObject> request = new HttpEntity<>(requestObject, headers);\r
+               RestTemplate restTemplate = getRestTemplate();\r
+               \r
+               try {\r
+                       ResponseEntity<PolicyEngineResponse[]> response = restTemplate.exchange(url, HttpMethod.POST, request, PolicyEngineResponse[].class);\r
+                       result = response.getBody();\r
+\r
+               } catch (RestClientException rce) {\r
+                       throw new VlantagApiException(rce.getLocalizedMessage());\r
+               }\r
+               return result;\r
+       }\r
+\r
+       private HttpHeaders getRequestHeaders() {\r
+               HttpHeaders headers = new HttpHeaders();\r
+               //Read from application environment with appropriate profile\r
+               headers.add(HttpHeaders.AUTHORIZATION, env.getProperty(POLICYMGR_AUTHORIZATION_PN));\r
+               headers.add(CLIENT_AUTH, env.getProperty(POLICYMGR_CLIENTAUTH_PN));\r
+               headers.add(ENVIRONMENT, env.getProperty(POLICYMGR_ENVIRONMENT_PN));\r
+               headers.add(HttpHeaders.ACCEPT, "application/json");\r
+               headers.add(HttpHeaders.CONTENT_TYPE, "application/json");\r
+               return headers;\r
+       }\r
+\r
+       public List<ResourceModel> getPolicyFromPDP(String policyName) throws VlantagApiException {\r
+\r
+        List<ResourceModel> retVal = null;\r
+\r
+        try {\r
+            RequestObject requestObject = new RequestObject();\r
+            requestObject.setPolicyName(policyName);\r
+            retVal = extractResourceModelsFromResponse(getConfigUsingPost(requestObject));\r
+        } catch (IOException e) {\r
+            throw new VlantagApiException(e);\r
+        } \r
+        return retVal;\r
+    }\r
+\r
+    public List<ResourceModel> extractResourceModelsFromResponse(PolicyEngineResponse[] result)\r
+            throws IOException {\r
+\r
+        List<ResourceModel> retVal = null;\r
+        if (null != result && result.length > 0) {\r
+\r
+            //There will be only one element in the result - confirmed with PDP developer\r
+            //Also, due to escaped duble quoted strings in the JSON, the config element will be deserialized\r
+            //as a String rather than as PolicyConfig. Which is good anyway for our processing, but FYI\r
+            // So , get the String and separately pass it through a new ObjectMapper\r
+            String configValue = result[0].getConfig();\r
+            ObjectMapper om = getConfigDeserializerObjectMapper();\r
+            PolicyConfig config = om.readValue(configValue, PolicyConfig.class);\r
+            retVal = config.getContent().getResourceModels();\r
+        }\r
+        return retVal;\r
+    }\r
+\r
+    private ObjectMapper getConfigDeserializerObjectMapper() {\r
+\r
+        /// We need a special deserializer for Policy data. Depending on policy name sent as input, the policy data returned\r
+        // differs not only in content, but in structure too. In other words, Polymorphism!!! There will be a(n) abstract\r
+        // PolicyData and one child each for each policy. The SOLID ASSUMPTION here is that there is one unique attribute in each\r
+        // policy to distinguish it from one another. \r
+        // If that turns out to be wrong, we will need another desrialization policy and corresponding new deserializer\r
+\r
+        PolicyDataDeserializer deserializer = new PolicyDataDeserializer();\r
+        deserializer.registerExtendersByUniqueness("key-type", ResourceModel.class);\r
+\r
+        SimpleModule module = new SimpleModule("PolymorphicPolicyDataDeserializerModule",\r
+                new Version(1, 0, 0, null, null, null));\r
+        module.addDeserializer(PolicyData.class, deserializer);\r
+\r
+        ObjectMapper om = new ObjectMapper();\r
+        om.registerModule(module);\r
+        om.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);\r
+\r
+        return om;\r
+    }\r
+\r
+    /*\r
+     * Get appropriately decorated REST template\r
+     */\r
+    private RestTemplate getRestTemplate() {\r
+        RestTemplate restTemplate = new RestTemplate(\r
+                new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory()));\r
+\r
+        ObjectMapper om = new ObjectMapper();\r
+        om.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true);\r
+        om.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY, true);\r
+        om.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);\r
+\r
+        MappingJackson2HttpMessageConverter convertor = new MappingJackson2HttpMessageConverter(om);\r
+        List<HttpMessageConverter<?>> messageConvertors = new ArrayList<>();\r
+        messageConvertors.add(convertor);\r
+        restTemplate.setMessageConverters(messageConvertors);\r
+        return restTemplate;\r
+    }\r
+    \r
+    public void setEnv(Environment env) {\r
+        this.env = env;\r
+    }\r
+\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css
new file mode 100644 (file)
index 0000000..01299a1
--- /dev/null
@@ -0,0 +1,1361 @@
+/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */\r
+.swagger-section pre code {\r
+  display: block;\r
+  padding: 0.5em;\r
+  background: #F0F0F0;\r
+}\r
+.swagger-section pre code,\r
+.swagger-section pre .subst,\r
+.swagger-section pre .tag .title,\r
+.swagger-section pre .lisp .title,\r
+.swagger-section pre .clojure .built_in,\r
+.swagger-section pre .nginx .title {\r
+  color: black;\r
+}\r
+.swagger-section pre .string,\r
+.swagger-section pre .title,\r
+.swagger-section pre .constant,\r
+.swagger-section pre .parent,\r
+.swagger-section pre .tag .value,\r
+.swagger-section pre .rules .value,\r
+.swagger-section pre .rules .value .number,\r
+.swagger-section pre .preprocessor,\r
+.swagger-section pre .ruby .symbol,\r
+.swagger-section pre .ruby .symbol .string,\r
+.swagger-section pre .aggregate,\r
+.swagger-section pre .template_tag,\r
+.swagger-section pre .django .variable,\r
+.swagger-section pre .smalltalk .class,\r
+.swagger-section pre .addition,\r
+.swagger-section pre .flow,\r
+.swagger-section pre .stream,\r
+.swagger-section pre .bash .variable,\r
+.swagger-section pre .apache .tag,\r
+.swagger-section pre .apache .cbracket,\r
+.swagger-section pre .tex .command,\r
+.swagger-section pre .tex .special,\r
+.swagger-section pre .erlang_repl .function_or_atom,\r
+.swagger-section pre .markdown .header {\r
+  color: #800;\r
+}\r
+.swagger-section pre .comment,\r
+.swagger-section pre .annotation,\r
+.swagger-section pre .template_comment,\r
+.swagger-section pre .diff .header,\r
+.swagger-section pre .chunk,\r
+.swagger-section pre .markdown .blockquote {\r
+  color: #888;\r
+}\r
+.swagger-section pre .number,\r
+.swagger-section pre .date,\r
+.swagger-section pre .regexp,\r
+.swagger-section pre .literal,\r
+.swagger-section pre .smalltalk .symbol,\r
+.swagger-section pre .smalltalk .char,\r
+.swagger-section pre .go .constant,\r
+.swagger-section pre .change,\r
+.swagger-section pre .markdown .bullet,\r
+.swagger-section pre .markdown .link_url {\r
+  color: #080;\r
+}\r
+.swagger-section pre .label,\r
+.swagger-section pre .javadoc,\r
+.swagger-section pre .ruby .string,\r
+.swagger-section pre .decorator,\r
+.swagger-section pre .filter .argument,\r
+.swagger-section pre .localvars,\r
+.swagger-section pre .array,\r
+.swagger-section pre .attr_selector,\r
+.swagger-section pre .important,\r
+.swagger-section pre .pseudo,\r
+.swagger-section pre .pi,\r
+.swagger-section pre .doctype,\r
+.swagger-section pre .deletion,\r
+.swagger-section pre .envvar,\r
+.swagger-section pre .shebang,\r
+.swagger-section pre .apache .sqbracket,\r
+.swagger-section pre .nginx .built_in,\r
+.swagger-section pre .tex .formula,\r
+.swagger-section pre .erlang_repl .reserved,\r
+.swagger-section pre .prompt,\r
+.swagger-section pre .markdown .link_label,\r
+.swagger-section pre .vhdl .attribute,\r
+.swagger-section pre .clojure .attribute,\r
+.swagger-section pre .coffeescript .property {\r
+  color: #88F;\r
+}\r
+.swagger-section pre .keyword,\r
+.swagger-section pre .id,\r
+.swagger-section pre .phpdoc,\r
+.swagger-section pre .title,\r
+.swagger-section pre .built_in,\r
+.swagger-section pre .aggregate,\r
+.swagger-section pre .css .tag,\r
+.swagger-section pre .javadoctag,\r
+.swagger-section pre .phpdoc,\r
+.swagger-section pre .yardoctag,\r
+.swagger-section pre .smalltalk .class,\r
+.swagger-section pre .winutils,\r
+.swagger-section pre .bash .variable,\r
+.swagger-section pre .apache .tag,\r
+.swagger-section pre .go .typename,\r
+.swagger-section pre .tex .command,\r
+.swagger-section pre .markdown .strong,\r
+.swagger-section pre .request,\r
+.swagger-section pre .status {\r
+  font-weight: bold;\r
+}\r
+.swagger-section pre .markdown .emphasis {\r
+  font-style: italic;\r
+}\r
+.swagger-section pre .nginx .built_in {\r
+  font-weight: normal;\r
+}\r
+.swagger-section pre .coffeescript .javascript,\r
+.swagger-section pre .javascript .xml,\r
+.swagger-section pre .tex .formula,\r
+.swagger-section pre .xml .javascript,\r
+.swagger-section pre .xml .vbscript,\r
+.swagger-section pre .xml .css,\r
+.swagger-section pre .xml .cdata {\r
+  opacity: 0.5;\r
+}\r
+.swagger-section .hljs {\r
+  display: block;\r
+  overflow-x: auto;\r
+  padding: 0.5em;\r
+  background: #F0F0F0;\r
+}\r
+.swagger-section .hljs,\r
+.swagger-section .hljs-subst {\r
+  color: #444;\r
+}\r
+.swagger-section .hljs-keyword,\r
+.swagger-section .hljs-attribute,\r
+.swagger-section .hljs-selector-tag,\r
+.swagger-section .hljs-meta-keyword,\r
+.swagger-section .hljs-doctag,\r
+.swagger-section .hljs-name {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .hljs-built_in,\r
+.swagger-section .hljs-literal,\r
+.swagger-section .hljs-bullet,\r
+.swagger-section .hljs-code,\r
+.swagger-section .hljs-addition {\r
+  color: #1F811F;\r
+}\r
+.swagger-section .hljs-regexp,\r
+.swagger-section .hljs-symbol,\r
+.swagger-section .hljs-variable,\r
+.swagger-section .hljs-template-variable,\r
+.swagger-section .hljs-link,\r
+.swagger-section .hljs-selector-attr,\r
+.swagger-section .hljs-selector-pseudo {\r
+  color: #BC6060;\r
+}\r
+.swagger-section .hljs-type,\r
+.swagger-section .hljs-string,\r
+.swagger-section .hljs-number,\r
+.swagger-section .hljs-selector-id,\r
+.swagger-section .hljs-selector-class,\r
+.swagger-section .hljs-quote,\r
+.swagger-section .hljs-template-tag,\r
+.swagger-section .hljs-deletion {\r
+  color: #880000;\r
+}\r
+.swagger-section .hljs-title,\r
+.swagger-section .hljs-section {\r
+  color: #880000;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .hljs-comment {\r
+  color: #888888;\r
+}\r
+.swagger-section .hljs-meta {\r
+  color: #2B6EA1;\r
+}\r
+.swagger-section .hljs-emphasis {\r
+  font-style: italic;\r
+}\r
+.swagger-section .hljs-strong {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap {\r
+  line-height: 1;\r
+  font-family: "Droid Sans", sans-serif;\r
+  min-width: 760px;\r
+  max-width: 960px;\r
+  margin-left: auto;\r
+  margin-right: auto;\r
+  /* JSONEditor specific styling */\r
+}\r
+.swagger-section .swagger-ui-wrap b,\r
+.swagger-section .swagger-ui-wrap strong {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap q,\r
+.swagger-section .swagger-ui-wrap blockquote {\r
+  quotes: none;\r
+}\r
+.swagger-section .swagger-ui-wrap p {\r
+  line-height: 1.4em;\r
+  padding: 0 0 10px;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap q:before,\r
+.swagger-section .swagger-ui-wrap q:after,\r
+.swagger-section .swagger-ui-wrap blockquote:before,\r
+.swagger-section .swagger-ui-wrap blockquote:after {\r
+  content: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h1,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h2,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h3,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h4,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h5,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h6 {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  -moz-box-sizing: border-box;\r
+  -webkit-box-sizing: border-box;\r
+  -ms-box-sizing: border-box;\r
+  box-sizing: border-box;\r
+  width: 60%;\r
+}\r
+.swagger-section .swagger-ui-wrap table {\r
+  border-collapse: collapse;\r
+  border-spacing: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap table thead tr th {\r
+  padding: 5px;\r
+  font-size: 0.9em;\r
+  color: #666666;\r
+  border-bottom: 1px solid #999999;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {\r
+  border-bottom: none;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr.offset {\r
+  background-color: #f0f0f0;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr td {\r
+  padding: 6px;\r
+  font-size: 0.9em;\r
+  border-bottom: 1px solid #cccccc;\r
+  vertical-align: top;\r
+  line-height: 1.3em;\r
+}\r
+.swagger-section .swagger-ui-wrap ol {\r
+  margin: 0px 0 10px;\r
+  padding: 0 0 0 18px;\r
+  list-style-type: decimal;\r
+}\r
+.swagger-section .swagger-ui-wrap ol li {\r
+  padding: 5px 0px;\r
+  font-size: 0.9em;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap ol,\r
+.swagger-section .swagger-ui-wrap ul {\r
+  list-style: none;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 a,\r
+.swagger-section .swagger-ui-wrap h2 a,\r
+.swagger-section .swagger-ui-wrap h3 a,\r
+.swagger-section .swagger-ui-wrap h4 a,\r
+.swagger-section .swagger-ui-wrap h5 a,\r
+.swagger-section .swagger-ui-wrap h6 a {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 a:hover,\r
+.swagger-section .swagger-ui-wrap h2 a:hover,\r
+.swagger-section .swagger-ui-wrap h3 a:hover,\r
+.swagger-section .swagger-ui-wrap h4 a:hover,\r
+.swagger-section .swagger-ui-wrap h5 a:hover,\r
+.swagger-section .swagger-ui-wrap h6 a:hover {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 span.divider,\r
+.swagger-section .swagger-ui-wrap h2 span.divider,\r
+.swagger-section .swagger-ui-wrap h3 span.divider,\r
+.swagger-section .swagger-ui-wrap h4 span.divider,\r
+.swagger-section .swagger-ui-wrap h5 span.divider,\r
+.swagger-section .swagger-ui-wrap h6 span.divider {\r
+  color: #aaaaaa;\r
+}\r
+.swagger-section .swagger-ui-wrap a {\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap a img {\r
+  border: none;\r
+}\r
+.swagger-section .swagger-ui-wrap article,\r
+.swagger-section .swagger-ui-wrap aside,\r
+.swagger-section .swagger-ui-wrap details,\r
+.swagger-section .swagger-ui-wrap figcaption,\r
+.swagger-section .swagger-ui-wrap figure,\r
+.swagger-section .swagger-ui-wrap footer,\r
+.swagger-section .swagger-ui-wrap header,\r
+.swagger-section .swagger-ui-wrap hgroup,\r
+.swagger-section .swagger-ui-wrap menu,\r
+.swagger-section .swagger-ui-wrap nav,\r
+.swagger-section .swagger-ui-wrap section,\r
+.swagger-section .swagger-ui-wrap summary {\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #fcf6db;\r
+  border: 1px solid #e5e0c6;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap pre code {\r
+  line-height: 1.6em;\r
+  background: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {\r
+  clear: both;\r
+  display: block;\r
+  color: #0F6AB4;\r
+  font-size: 1.1em;\r
+  margin: 0;\r
+  padding: 15px 0 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .content pre {\r
+  font-size: 12px;\r
+  margin-top: 5px;\r
+  padding: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .icon-btn {\r
+  cursor: pointer;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_title {\r
+  padding-bottom: 10px;\r
+  font-weight: bold;\r
+  font-size: 25px;\r
+}\r
+.swagger-section .swagger-ui-wrap .footer {\r
+  margin-top: 20px;\r
+}\r
+.swagger-section .swagger-ui-wrap p.big,\r
+.swagger-section .swagger-ui-wrap div.big p {\r
+  font-size: 1em;\r
+  margin-bottom: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {\r
+  width: 500px !important;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_license {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_tos {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .message-fail {\r
+  color: #cc0000;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_url {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_email {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_name {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_description {\r
+  padding-bottom: 10px;\r
+  font-size: 15px;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown ol li,\r
+.swagger-section .swagger-ui-wrap .markdown ul li {\r
+  padding: 3px 0px;\r
+  line-height: 1.4em;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {\r
+  display: block;\r
+  padding: 4px;\r
+  width: auto;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {\r
+  font-size: 1.3em;\r
+}\r
+.swagger-section .swagger-ui-wrap table.fullwidth {\r
+  width: 100%;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-size: 1em;\r
+  line-height: 1.5em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {\r
+  text-decoration: none;\r
+  color: #AAA;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {\r
+  text-decoration: underline;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {\r
+  color: black;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propType {\r
+  color: #5555aa;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature pre:hover {\r
+  background-color: #ffffdd;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature pre {\r
+  font-size: .85em;\r
+  line-height: 1.2em;\r
+  overflow: auto;\r
+  max-height: 200px;\r
+  cursor: pointer;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {\r
+  display: block;\r
+  min-width: 230px;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {\r
+  float: left;\r
+  margin: 0 5px 5px 0;\r
+  padding: 2px 5px 2px 0;\r
+  border-right: 1px solid #ddd;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propOpt {\r
+  color: #555;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {\r
+  font-size: 0.75em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propOptKey {\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .strong {\r
+  font-weight: bold;\r
+  color: #000;\r
+  font-size: .9em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description div {\r
+  font-size: 0.9em;\r
+  line-height: 1.5em;\r
+  margin-left: 1em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .stronger {\r
+  font-weight: bold;\r
+  color: #000;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {\r
+  border-spacing: 0;\r
+  position: absolute;\r
+  background-color: #ffffff;\r
+  border: 1px solid #bbbbbb;\r
+  display: none;\r
+  font-size: 11px;\r
+  max-width: 400px;\r
+  line-height: 30px;\r
+  color: black;\r
+  padding: 5px;\r
+  margin-left: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {\r
+  text-align: center;\r
+  background-color: #eeeeee;\r
+  border: 1px solid #bbbbbb;\r
+  font-size: 11px;\r
+  color: #666666;\r
+  font-weight: bold;\r
+  padding: 5px;\r
+  line-height: 15px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {\r
+  display: inline;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {\r
+  display: block;\r
+  content: '';\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {\r
+  margin-right: -3px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propName {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap .body-textarea {\r
+  width: 300px;\r
+  height: 100px;\r
+  border: 1px solid #aaa;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown p code,\r
+.swagger-section .swagger-ui-wrap .markdown li code {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #f0f0f0;\r
+  color: black;\r
+  padding: 1px 3px;\r
+}\r
+.swagger-section .swagger-ui-wrap .required {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder label {\r
+  font-weight: normal!important;\r
+  /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder label.required {\r
+  font-weight: bold!important;\r
+}\r
+.swagger-section .swagger-ui-wrap input.parameter {\r
+  width: 300px;\r
+  border: 1px solid #aaa;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 {\r
+  color: black;\r
+  font-size: 1.5em;\r
+  line-height: 1.3em;\r
+  padding: 10px 0 10px 0;\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  -moz-box-sizing: border-box;\r
+  -webkit-box-sizing: border-box;\r
+  -ms-box-sizing: border-box;\r
+  box-sizing: border-box;\r
+  margin-top: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 {\r
+  color: black;\r
+  font-size: 1.3em;\r
+  padding: 10px 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 a {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 span.sub {\r
+  font-size: 0.7em;\r
+  color: #999999;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 span.sub a {\r
+  color: #777777;\r
+}\r
+.swagger-section .swagger-ui-wrap span.weak {\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap .message-success {\r
+  color: #89BF04;\r
+}\r
+.swagger-section .swagger-ui-wrap caption,\r
+.swagger-section .swagger-ui-wrap th,\r
+.swagger-section .swagger-ui-wrap td {\r
+  text-align: left;\r
+  font-weight: normal;\r
+  vertical-align: middle;\r
+}\r
+.swagger-section .swagger-ui-wrap .code {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {\r
+  font-family: "Droid Sans", sans-serif;\r
+  height: 250px;\r
+  padding: 4px;\r
+  display: block;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {\r
+  display: block;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {\r
+  display: block;\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {\r
+  display: block;\r
+  float: left;\r
+  clear: none;\r
+  margin: 0 5px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {\r
+  display: block;\r
+  clear: both;\r
+  width: auto;\r
+  padding: 0 0 3px;\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {\r
+  padding-left: 3px;\r
+  color: #888888;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {\r
+  margin-left: 0;\r
+  font-style: italic;\r
+  font-size: 0.9em;\r
+  margin: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap span.blank,\r
+.swagger-section .swagger-ui-wrap span.empty {\r
+  color: #888888;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown h3 {\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown h4 {\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #fcf6db;\r
+  border: 1px solid #e5e0c6;\r
+  padding: 10px;\r
+  margin: 0 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown pre code {\r
+  line-height: 1.6em;\r
+}\r
+.swagger-section .swagger-ui-wrap div.gist {\r
+  margin: 20px 0 25px 0 !important;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource {\r
+  border-bottom: 1px solid #dddddd;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {\r
+  color: #555555;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {\r
+  border-bottom: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {\r
+  border: 1px solid transparent;\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {\r
+  overflow: hidden;\r
+  padding: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  margin: 14px 10px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 2px 10px;\r
+  border-right: 1px solid #dddddd;\r
+  color: #666666;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {\r
+  color: #aaaaaa;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {\r
+  text-decoration: underline;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {\r
+  color: #999999;\r
+  padding-left: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {\r
+  color: #999999;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+  margin: 0 0 10px;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  width: auto;\r
+  margin: 0;\r
+  padding: 0;\r
+  line-height: 1.1em;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {\r
+  padding-left: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {\r
+  color: black;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated {\r
+  text-decoration: line-through;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  text-decoration: none;\r
+  color: white;\r
+  display: inline-block;\r
+  width: 50px;\r
+  font-size: 0.7em;\r
+  text-align: center;\r
+  padding: 7px 0 4px;\r
+  -moz-border-radius: 2px;\r
+  -webkit-border-radius: 2px;\r
+  -o-border-radius: 2px;\r
+  -ms-border-radius: 2px;\r
+  -khtml-border-radius: 2px;\r
+  border-radius: 2px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {\r
+  overflow: hidden;\r
+  padding: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  margin: 6px 10px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 2px 10px;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {\r
+  border-top: none;\r
+  padding: 10px;\r
+  -moz-border-radius-bottomleft: 6px;\r
+  -webkit-border-bottom-left-radius: 6px;\r
+  -o-border-bottom-left-radius: 6px;\r
+  -ms-border-bottom-left-radius: 6px;\r
+  -khtml-border-bottom-left-radius: 6px;\r
+  border-bottom-left-radius: 6px;\r
+  -moz-border-radius-bottomright: 6px;\r
+  -webkit-border-bottom-right-radius: 6px;\r
+  -o-border-bottom-right-radius: 6px;\r
+  -ms-border-bottom-right-radius: 6px;\r
+  -khtml-border-bottom-right-radius: 6px;\r
+  border-bottom-right-radius: 6px;\r
+  margin: 0 0 20px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {\r
+  font-size: 1.1em;\r
+  margin: 0;\r
+  padding: 15px 0 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {\r
+  padding: 4px 0 0 10px;\r
+  display: inline-block;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  padding: 6px 8px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {\r
+  background-image: url('../images/throbber.gif');\r
+  width: 128px;\r
+  height: 16px;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {\r
+  outline: 2px solid black;\r
+  outline-color: #cc0000;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {\r
+  max-width: 300px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  padding: 10px;\r
+  font-size: 0.9em;\r
+  max-height: 400px;\r
+  overflow-y: auto;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {\r
+  background-color: #f9f2e9;\r
+  border: 1px solid #f0e0ca;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {\r
+  background-color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #f0e0ca;\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {\r
+  background-color: #faf5ee;\r
+  border: 1px solid #f0e0ca;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {\r
+  color: #dcb67f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {\r
+  background-color: #fcffcd;\r
+  border: 1px solid black;\r
+  border-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  background-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #ffd20f;\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {\r
+  background-color: #fcffcd;\r
+  border: 1px solid black;\r
+  border-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {\r
+  color: #6fc992;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {\r
+  background-color: #f5e8e8;\r
+  border: 1px solid #e8c6c7;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  background-color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #e8c6c7;\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {\r
+  background-color: #f7eded;\r
+  border: 1px solid #e8c6c7;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {\r
+  color: #c8787a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {\r
+  background-color: #e7f6ec;\r
+  border: 1px solid #c3e8d1;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {\r
+  background-color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3e8d1;\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {\r
+  background-color: #ebf7f0;\r
+  border: 1px solid #c3e8d1;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {\r
+  color: #6fc992;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {\r
+  background-color: #FCE9E3;\r
+  border: 1px solid #F5D5C3;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {\r
+  background-color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #f0cecb;\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {\r
+  background-color: #faf0ef;\r
+  border: 1px solid #f0cecb;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {\r
+  color: #dcb67f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {\r
+  background-color: #e7f0f7;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {\r
+  background-color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3d9ec;\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {\r
+  color: #6fa5d2;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {\r
+  background-color: #e7f0f7;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {\r
+  background-color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3d9ec;\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {\r
+  color: #6fa5d2;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {\r
+  border-top: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap p#colophon {\r
+  margin: 0 15px 40px 15px;\r
+  padding: 10px 0;\r
+  font-size: 0.8em;\r
+  border-top: 1px solid #dddddd;\r
+  font-family: "Droid Sans", sans-serif;\r
+  color: #999999;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap p#colophon a {\r
+  text-decoration: none;\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap h3 {\r
+  color: black;\r
+  font-size: 1.1em;\r
+  padding: 10px 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown ol,\r
+.swagger-section .swagger-ui-wrap .markdown ul {\r
+  font-family: "Droid Sans", sans-serif;\r
+  margin: 5px 0 10px;\r
+  padding: 0 0 0 18px;\r
+  list-style-type: disc;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box label {\r
+  color: #0f6ab4 !important;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {\r
+  display: block;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p.weak {\r
+  font-size: 0.8em;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p {\r
+  font-size: 0.9em;\r
+  padding: 0 0 15px;\r
+  color: #7e7b6d;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p a {\r
+  color: #646257;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p strong {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {\r
+  padding-bottom: 0;\r
+}\r
+.swagger-section .title {\r
+  font-style: bold;\r
+}\r
+.swagger-section .secondary_form {\r
+  display: none;\r
+}\r
+.swagger-section .main_image {\r
+  display: block;\r
+  margin-left: auto;\r
+  margin-right: auto;\r
+}\r
+.swagger-section .oauth_body {\r
+  margin-left: 100px;\r
+  margin-right: 100px;\r
+}\r
+.swagger-section .oauth_submit {\r
+  text-align: center;\r
+  display: inline-block;\r
+}\r
+.swagger-section .authorize-wrapper {\r
+  margin: 15px 0 10px;\r
+}\r
+.swagger-section .authorize-wrapper_operation {\r
+  float: right;\r
+}\r
+.swagger-section .authorize__btn:hover {\r
+  text-decoration: underline;\r
+  cursor: pointer;\r
+}\r
+.swagger-section .authorize__btn_operation:hover .authorize-scopes {\r
+  display: block;\r
+}\r
+.swagger-section .authorize-scopes {\r
+  position: absolute;\r
+  margin-top: 20px;\r
+  background: #FFF;\r
+  border: 1px solid #ccc;\r
+  border-radius: 5px;\r
+  display: none;\r
+  font-size: 13px;\r
+  max-width: 300px;\r
+  line-height: 30px;\r
+  color: black;\r
+  padding: 5px;\r
+}\r
+.swagger-section .authorize-scopes .authorize__scope {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .authorize__btn_operation {\r
+  height: 18px;\r
+  vertical-align: middle;\r
+  display: inline-block;\r
+  background: url(../images/explorer_icons.png) no-repeat;\r
+}\r
+.swagger-section .authorize__btn_operation_login {\r
+  background-position: 0 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section .authorize__btn_operation_logout {\r
+  background-position: -30px 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section #auth_container {\r
+  color: #fff;\r
+  display: inline-block;\r
+  border: none;\r
+  padding: 5px;\r
+  width: 87px;\r
+  height: 13px;\r
+}\r
+.swagger-section #auth_container .authorize__btn {\r
+  color: #fff;\r
+}\r
+.swagger-section .auth_container {\r
+  padding: 0 0 10px;\r
+  margin-bottom: 5px;\r
+  border-bottom: solid 1px #CCC;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .auth_container .auth__title {\r
+  color: #547f00;\r
+  font-size: 1.2em;\r
+}\r
+.swagger-section .auth_container .basic_auth__label {\r
+  display: inline-block;\r
+  width: 60px;\r
+}\r
+.swagger-section .auth_container .auth__description {\r
+  color: #999999;\r
+  margin-bottom: 5px;\r
+}\r
+.swagger-section .auth_container .auth__button {\r
+  margin-top: 10px;\r
+  height: 30px;\r
+}\r
+.swagger-section .auth_container .key_auth__field {\r
+  margin: 5px 0;\r
+}\r
+.swagger-section .auth_container .key_auth__label {\r
+  display: inline-block;\r
+  width: 60px;\r
+}\r
+.swagger-section .api-popup-dialog {\r
+  position: absolute;\r
+  display: none;\r
+}\r
+.swagger-section .api-popup-dialog-wrapper {\r
+  z-index: 1000;\r
+  width: 500px;\r
+  background: #FFF;\r
+  padding: 20px;\r
+  border: 1px solid #ccc;\r
+  border-radius: 5px;\r
+  font-size: 13px;\r
+  color: #777;\r
+  position: fixed;\r
+  top: 50%;\r
+  left: 50%;\r
+  transform: translate(-50%, -50%);\r
+}\r
+.swagger-section .api-popup-dialog-shadow {\r
+  position: fixed;\r
+  top: 0;\r
+  left: 0;\r
+  width: 100%;\r
+  height: 100%;\r
+  opacity: 0.2;\r
+  background-color: gray;\r
+  z-index: 900;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-title {\r
+  font-size: 24px;\r
+  padding: 10px 0;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-title {\r
+  font-size: 24px;\r
+  padding: 10px 0;\r
+}\r
+.swagger-section .api-popup-dialog .error-msg {\r
+  padding-left: 5px;\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-content {\r
+  max-height: 500px;\r
+  overflow-y: auto;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-authbtn {\r
+  height: 30px;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-cancel {\r
+  height: 30px;\r
+}\r
+.swagger-section .api-popup-scopes {\r
+  padding: 10px 20px;\r
+}\r
+.swagger-section .api-popup-scopes li {\r
+  padding: 5px 0;\r
+  line-height: 20px;\r
+}\r
+.swagger-section .api-popup-scopes li input {\r
+  position: relative;\r
+  top: 2px;\r
+}\r
+.swagger-section .api-popup-scopes .api-scope-desc {\r
+  padding-left: 20px;\r
+  font-style: italic;\r
+}\r
+.swagger-section .api-popup-actions {\r
+  padding-top: 10px;\r
+}\r
+#header {\r
+  display: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature pre {\r
+  max-height: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .body-textarea {\r
+  width: 100px;\r
+}\r
+.swagger-section .swagger-ui-wrap input.parameter {\r
+  width: 100px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {\r
+  display: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints {\r
+  display: block !important;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {\r
+  display: block !important;\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css
new file mode 100644 (file)
index 0000000..84ef0e6
--- /dev/null
@@ -0,0 +1,125 @@
+/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */\r
+html,\r
+body,\r
+div,\r
+span,\r
+applet,\r
+object,\r
+iframe,\r
+h1,\r
+h2,\r
+h3,\r
+h4,\r
+h5,\r
+h6,\r
+p,\r
+blockquote,\r
+pre,\r
+a,\r
+abbr,\r
+acronym,\r
+address,\r
+big,\r
+cite,\r
+code,\r
+del,\r
+dfn,\r
+em,\r
+img,\r
+ins,\r
+kbd,\r
+q,\r
+s,\r
+samp,\r
+small,\r
+strike,\r
+strong,\r
+sub,\r
+sup,\r
+tt,\r
+var,\r
+b,\r
+u,\r
+i,\r
+center,\r
+dl,\r
+dt,\r
+dd,\r
+ol,\r
+ul,\r
+li,\r
+fieldset,\r
+form,\r
+label,\r
+legend,\r
+table,\r
+caption,\r
+tbody,\r
+tfoot,\r
+thead,\r
+tr,\r
+th,\r
+td,\r
+article,\r
+aside,\r
+canvas,\r
+details,\r
+embed,\r
+figure,\r
+figcaption,\r
+footer,\r
+header,\r
+hgroup,\r
+menu,\r
+nav,\r
+output,\r
+ruby,\r
+section,\r
+summary,\r
+time,\r
+mark,\r
+audio,\r
+video {\r
+  margin: 0;\r
+  padding: 0;\r
+  border: 0;\r
+  font-size: 100%;\r
+  font: inherit;\r
+  vertical-align: baseline;\r
+}\r
+/* HTML5 display-role reset for older browsers */\r
+article,\r
+aside,\r
+details,\r
+figcaption,\r
+figure,\r
+footer,\r
+header,\r
+hgroup,\r
+menu,\r
+nav,\r
+section {\r
+  display: block;\r
+}\r
+body {\r
+  line-height: 1;\r
+}\r
+ol,\r
+ul {\r
+  list-style: none;\r
+}\r
+blockquote,\r
+q {\r
+  quotes: none;\r
+}\r
+blockquote:before,\r
+blockquote:after,\r
+q:before,\r
+q:after {\r
+  content: '';\r
+  content: none;\r
+}\r
+table {\r
+  border-collapse: collapse;\r
+  border-spacing: 0;\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css
new file mode 100644 (file)
index 0000000..a5a1e5f
--- /dev/null
@@ -0,0 +1,1488 @@
+/* Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> */\r
+.swagger-section pre code {\r
+  display: block;\r
+  padding: 0.5em;\r
+  background: #F0F0F0;\r
+}\r
+.swagger-section pre code,\r
+.swagger-section pre .subst,\r
+.swagger-section pre .tag .title,\r
+.swagger-section pre .lisp .title,\r
+.swagger-section pre .clojure .built_in,\r
+.swagger-section pre .nginx .title {\r
+  color: black;\r
+}\r
+.swagger-section pre .string,\r
+.swagger-section pre .title,\r
+.swagger-section pre .constant,\r
+.swagger-section pre .parent,\r
+.swagger-section pre .tag .value,\r
+.swagger-section pre .rules .value,\r
+.swagger-section pre .rules .value .number,\r
+.swagger-section pre .preprocessor,\r
+.swagger-section pre .ruby .symbol,\r
+.swagger-section pre .ruby .symbol .string,\r
+.swagger-section pre .aggregate,\r
+.swagger-section pre .template_tag,\r
+.swagger-section pre .django .variable,\r
+.swagger-section pre .smalltalk .class,\r
+.swagger-section pre .addition,\r
+.swagger-section pre .flow,\r
+.swagger-section pre .stream,\r
+.swagger-section pre .bash .variable,\r
+.swagger-section pre .apache .tag,\r
+.swagger-section pre .apache .cbracket,\r
+.swagger-section pre .tex .command,\r
+.swagger-section pre .tex .special,\r
+.swagger-section pre .erlang_repl .function_or_atom,\r
+.swagger-section pre .markdown .header {\r
+  color: #800;\r
+}\r
+.swagger-section pre .comment,\r
+.swagger-section pre .annotation,\r
+.swagger-section pre .template_comment,\r
+.swagger-section pre .diff .header,\r
+.swagger-section pre .chunk,\r
+.swagger-section pre .markdown .blockquote {\r
+  color: #888;\r
+}\r
+.swagger-section pre .number,\r
+.swagger-section pre .date,\r
+.swagger-section pre .regexp,\r
+.swagger-section pre .literal,\r
+.swagger-section pre .smalltalk .symbol,\r
+.swagger-section pre .smalltalk .char,\r
+.swagger-section pre .go .constant,\r
+.swagger-section pre .change,\r
+.swagger-section pre .markdown .bullet,\r
+.swagger-section pre .markdown .link_url {\r
+  color: #080;\r
+}\r
+.swagger-section pre .label,\r
+.swagger-section pre .javadoc,\r
+.swagger-section pre .ruby .string,\r
+.swagger-section pre .decorator,\r
+.swagger-section pre .filter .argument,\r
+.swagger-section pre .localvars,\r
+.swagger-section pre .array,\r
+.swagger-section pre .attr_selector,\r
+.swagger-section pre .important,\r
+.swagger-section pre .pseudo,\r
+.swagger-section pre .pi,\r
+.swagger-section pre .doctype,\r
+.swagger-section pre .deletion,\r
+.swagger-section pre .envvar,\r
+.swagger-section pre .shebang,\r
+.swagger-section pre .apache .sqbracket,\r
+.swagger-section pre .nginx .built_in,\r
+.swagger-section pre .tex .formula,\r
+.swagger-section pre .erlang_repl .reserved,\r
+.swagger-section pre .prompt,\r
+.swagger-section pre .markdown .link_label,\r
+.swagger-section pre .vhdl .attribute,\r
+.swagger-section pre .clojure .attribute,\r
+.swagger-section pre .coffeescript .property {\r
+  color: #88F;\r
+}\r
+.swagger-section pre .keyword,\r
+.swagger-section pre .id,\r
+.swagger-section pre .phpdoc,\r
+.swagger-section pre .title,\r
+.swagger-section pre .built_in,\r
+.swagger-section pre .aggregate,\r
+.swagger-section pre .css .tag,\r
+.swagger-section pre .javadoctag,\r
+.swagger-section pre .phpdoc,\r
+.swagger-section pre .yardoctag,\r
+.swagger-section pre .smalltalk .class,\r
+.swagger-section pre .winutils,\r
+.swagger-section pre .bash .variable,\r
+.swagger-section pre .apache .tag,\r
+.swagger-section pre .go .typename,\r
+.swagger-section pre .tex .command,\r
+.swagger-section pre .markdown .strong,\r
+.swagger-section pre .request,\r
+.swagger-section pre .status {\r
+  font-weight: bold;\r
+}\r
+.swagger-section pre .markdown .emphasis {\r
+  font-style: italic;\r
+}\r
+.swagger-section pre .nginx .built_in {\r
+  font-weight: normal;\r
+}\r
+.swagger-section pre .coffeescript .javascript,\r
+.swagger-section pre .javascript .xml,\r
+.swagger-section pre .tex .formula,\r
+.swagger-section pre .xml .javascript,\r
+.swagger-section pre .xml .vbscript,\r
+.swagger-section pre .xml .css,\r
+.swagger-section pre .xml .cdata {\r
+  opacity: 0.5;\r
+}\r
+.swagger-section .hljs {\r
+  display: block;\r
+  overflow-x: auto;\r
+  padding: 0.5em;\r
+  background: #F0F0F0;\r
+}\r
+.swagger-section .hljs,\r
+.swagger-section .hljs-subst {\r
+  color: #444;\r
+}\r
+.swagger-section .hljs-keyword,\r
+.swagger-section .hljs-attribute,\r
+.swagger-section .hljs-selector-tag,\r
+.swagger-section .hljs-meta-keyword,\r
+.swagger-section .hljs-doctag,\r
+.swagger-section .hljs-name {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .hljs-built_in,\r
+.swagger-section .hljs-literal,\r
+.swagger-section .hljs-bullet,\r
+.swagger-section .hljs-code,\r
+.swagger-section .hljs-addition {\r
+  color: #1F811F;\r
+}\r
+.swagger-section .hljs-regexp,\r
+.swagger-section .hljs-symbol,\r
+.swagger-section .hljs-variable,\r
+.swagger-section .hljs-template-variable,\r
+.swagger-section .hljs-link,\r
+.swagger-section .hljs-selector-attr,\r
+.swagger-section .hljs-selector-pseudo {\r
+  color: #BC6060;\r
+}\r
+.swagger-section .hljs-type,\r
+.swagger-section .hljs-string,\r
+.swagger-section .hljs-number,\r
+.swagger-section .hljs-selector-id,\r
+.swagger-section .hljs-selector-class,\r
+.swagger-section .hljs-quote,\r
+.swagger-section .hljs-template-tag,\r
+.swagger-section .hljs-deletion {\r
+  color: #880000;\r
+}\r
+.swagger-section .hljs-title,\r
+.swagger-section .hljs-section {\r
+  color: #880000;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .hljs-comment {\r
+  color: #888888;\r
+}\r
+.swagger-section .hljs-meta {\r
+  color: #2B6EA1;\r
+}\r
+.swagger-section .hljs-emphasis {\r
+  font-style: italic;\r
+}\r
+.swagger-section .hljs-strong {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap {\r
+  line-height: 1;\r
+  font-family: "Droid Sans", sans-serif;\r
+  min-width: 760px;\r
+  max-width: 960px;\r
+  margin-left: auto;\r
+  margin-right: auto;\r
+  /* JSONEditor specific styling */\r
+}\r
+.swagger-section .swagger-ui-wrap b,\r
+.swagger-section .swagger-ui-wrap strong {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap q,\r
+.swagger-section .swagger-ui-wrap blockquote {\r
+  quotes: none;\r
+}\r
+.swagger-section .swagger-ui-wrap p {\r
+  line-height: 1.4em;\r
+  padding: 0 0 10px;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap q:before,\r
+.swagger-section .swagger-ui-wrap q:after,\r
+.swagger-section .swagger-ui-wrap blockquote:before,\r
+.swagger-section .swagger-ui-wrap blockquote:after {\r
+  content: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h1,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h2,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h3,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h4,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h5,\r
+.swagger-section .swagger-ui-wrap .heading_with_menu h6 {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  -moz-box-sizing: border-box;\r
+  -webkit-box-sizing: border-box;\r
+  -ms-box-sizing: border-box;\r
+  box-sizing: border-box;\r
+  width: 60%;\r
+}\r
+.swagger-section .swagger-ui-wrap table {\r
+  border-collapse: collapse;\r
+  border-spacing: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap table thead tr th {\r
+  padding: 5px;\r
+  font-size: 0.9em;\r
+  color: #666666;\r
+  border-bottom: 1px solid #999999;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr:last-child td {\r
+  border-bottom: none;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr.offset {\r
+  background-color: #f0f0f0;\r
+}\r
+.swagger-section .swagger-ui-wrap table tbody tr td {\r
+  padding: 6px;\r
+  font-size: 0.9em;\r
+  border-bottom: 1px solid #cccccc;\r
+  vertical-align: top;\r
+  line-height: 1.3em;\r
+}\r
+.swagger-section .swagger-ui-wrap ol {\r
+  margin: 0px 0 10px;\r
+  padding: 0 0 0 18px;\r
+  list-style-type: decimal;\r
+}\r
+.swagger-section .swagger-ui-wrap ol li {\r
+  padding: 5px 0px;\r
+  font-size: 0.9em;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap ol,\r
+.swagger-section .swagger-ui-wrap ul {\r
+  list-style: none;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 a,\r
+.swagger-section .swagger-ui-wrap h2 a,\r
+.swagger-section .swagger-ui-wrap h3 a,\r
+.swagger-section .swagger-ui-wrap h4 a,\r
+.swagger-section .swagger-ui-wrap h5 a,\r
+.swagger-section .swagger-ui-wrap h6 a {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 a:hover,\r
+.swagger-section .swagger-ui-wrap h2 a:hover,\r
+.swagger-section .swagger-ui-wrap h3 a:hover,\r
+.swagger-section .swagger-ui-wrap h4 a:hover,\r
+.swagger-section .swagger-ui-wrap h5 a:hover,\r
+.swagger-section .swagger-ui-wrap h6 a:hover {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 span.divider,\r
+.swagger-section .swagger-ui-wrap h2 span.divider,\r
+.swagger-section .swagger-ui-wrap h3 span.divider,\r
+.swagger-section .swagger-ui-wrap h4 span.divider,\r
+.swagger-section .swagger-ui-wrap h5 span.divider,\r
+.swagger-section .swagger-ui-wrap h6 span.divider {\r
+  color: #aaaaaa;\r
+}\r
+.swagger-section .swagger-ui-wrap a {\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap a img {\r
+  border: none;\r
+}\r
+.swagger-section .swagger-ui-wrap article,\r
+.swagger-section .swagger-ui-wrap aside,\r
+.swagger-section .swagger-ui-wrap details,\r
+.swagger-section .swagger-ui-wrap figcaption,\r
+.swagger-section .swagger-ui-wrap figure,\r
+.swagger-section .swagger-ui-wrap footer,\r
+.swagger-section .swagger-ui-wrap header,\r
+.swagger-section .swagger-ui-wrap hgroup,\r
+.swagger-section .swagger-ui-wrap menu,\r
+.swagger-section .swagger-ui-wrap nav,\r
+.swagger-section .swagger-ui-wrap section,\r
+.swagger-section .swagger-ui-wrap summary {\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #fcf6db;\r
+  border: 1px solid #e5e0c6;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap pre code {\r
+  line-height: 1.6em;\r
+  background: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .content > .content-type > div > label {\r
+  clear: both;\r
+  display: block;\r
+  color: #0F6AB4;\r
+  font-size: 1.1em;\r
+  margin: 0;\r
+  padding: 15px 0 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .content pre {\r
+  font-size: 12px;\r
+  margin-top: 5px;\r
+  padding: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .icon-btn {\r
+  cursor: pointer;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_title {\r
+  padding-bottom: 10px;\r
+  font-weight: bold;\r
+  font-size: 25px;\r
+}\r
+.swagger-section .swagger-ui-wrap .footer {\r
+  margin-top: 20px;\r
+}\r
+.swagger-section .swagger-ui-wrap p.big,\r
+.swagger-section .swagger-ui-wrap div.big p {\r
+  font-size: 1em;\r
+  margin-bottom: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea,\r
+.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input {\r
+  width: 500px !important;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_license {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_tos {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .message-fail {\r
+  color: #cc0000;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_url {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_email {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_name {\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap .info_description {\r
+  padding-bottom: 10px;\r
+  font-size: 15px;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown ol li,\r
+.swagger-section .swagger-ui-wrap .markdown ul li {\r
+  padding: 3px 0px;\r
+  line-height: 1.4em;\r
+  color: #333333;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input {\r
+  display: block;\r
+  padding: 4px;\r
+  width: auto;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title,\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title {\r
+  font-size: 1.3em;\r
+}\r
+.swagger-section .swagger-ui-wrap table.fullwidth {\r
+  width: 100%;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-size: 1em;\r
+  line-height: 1.5em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a {\r
+  text-decoration: none;\r
+  color: #AAA;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover {\r
+  text-decoration: underline;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected {\r
+  color: black;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propType {\r
+  color: #5555aa;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature pre:hover {\r
+  background-color: #ffffdd;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature pre {\r
+  font-size: .85em;\r
+  line-height: 1.2em;\r
+  overflow: auto;\r
+  max-height: 200px;\r
+  cursor: pointer;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav {\r
+  display: block;\r
+  min-width: 230px;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li {\r
+  float: left;\r
+  margin: 0 5px 5px 0;\r
+  padding: 2px 5px 2px 0;\r
+  border-right: 1px solid #ddd;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propOpt {\r
+  color: #555;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .snippet small {\r
+  font-size: 0.75em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propOptKey {\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .strong {\r
+  font-weight: bold;\r
+  color: #000;\r
+  font-size: .9em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description div {\r
+  font-size: 0.9em;\r
+  line-height: 1.5em;\r
+  margin-left: 1em;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .stronger {\r
+  font-weight: bold;\r
+  color: #000;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper {\r
+  border-spacing: 0;\r
+  position: absolute;\r
+  background-color: #ffffff;\r
+  border: 1px solid #bbbbbb;\r
+  display: none;\r
+  font-size: 11px;\r
+  max-width: 400px;\r
+  line-height: 30px;\r
+  color: black;\r
+  padding: 5px;\r
+  margin-left: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th {\r
+  text-align: center;\r
+  background-color: #eeeeee;\r
+  border: 1px solid #bbbbbb;\r
+  font-size: 11px;\r
+  color: #666666;\r
+  font-weight: bold;\r
+  padding: 5px;\r
+  line-height: 15px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child,\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child {\r
+  display: inline;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before {\r
+  display: block;\r
+  content: '';\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child {\r
+  margin-right: -3px;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .propName {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .model-signature .signature-container {\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap .body-textarea {\r
+  width: 300px;\r
+  height: 100px;\r
+  border: 1px solid #aaa;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown p code,\r
+.swagger-section .swagger-ui-wrap .markdown li code {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #f0f0f0;\r
+  color: black;\r
+  padding: 1px 3px;\r
+}\r
+.swagger-section .swagger-ui-wrap .required {\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder label {\r
+  font-weight: normal!important;\r
+  /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */\r
+}\r
+.swagger-section .swagger-ui-wrap .editor_holder label.required {\r
+  font-weight: bold!important;\r
+}\r
+.swagger-section .swagger-ui-wrap input.parameter {\r
+  width: 300px;\r
+  border: 1px solid #aaa;\r
+}\r
+.swagger-section .swagger-ui-wrap h1 {\r
+  color: black;\r
+  font-size: 1.5em;\r
+  line-height: 1.3em;\r
+  padding: 10px 0 10px 0;\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap .heading_with_menu ul {\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  -moz-box-sizing: border-box;\r
+  -webkit-box-sizing: border-box;\r
+  -ms-box-sizing: border-box;\r
+  box-sizing: border-box;\r
+  margin-top: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 {\r
+  color: black;\r
+  font-size: 1.3em;\r
+  padding: 10px 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 a {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 span.sub {\r
+  font-size: 0.7em;\r
+  color: #999999;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 span.sub a {\r
+  color: #777777;\r
+}\r
+.swagger-section .swagger-ui-wrap span.weak {\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap .message-success {\r
+  color: #89BF04;\r
+}\r
+.swagger-section .swagger-ui-wrap caption,\r
+.swagger-section .swagger-ui-wrap th,\r
+.swagger-section .swagger-ui-wrap td {\r
+  text-align: left;\r
+  font-weight: normal;\r
+  vertical-align: middle;\r
+}\r
+.swagger-section .swagger-ui-wrap .code {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea {\r
+  font-family: "Droid Sans", sans-serif;\r
+  height: 250px;\r
+  padding: 4px;\r
+  display: block;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select {\r
+  display: block;\r
+  clear: both;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label {\r
+  display: block;\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input {\r
+  display: block;\r
+  float: left;\r
+  clear: none;\r
+  margin: 0 5px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label {\r
+  display: block;\r
+  clear: both;\r
+  width: auto;\r
+  padding: 0 0 3px;\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr {\r
+  padding-left: 3px;\r
+  color: #888888;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints {\r
+  margin-left: 0;\r
+  font-style: italic;\r
+  font-size: 0.9em;\r
+  margin: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons {\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap span.blank,\r
+.swagger-section .swagger-ui-wrap span.empty {\r
+  color: #888888;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown h3 {\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown h4 {\r
+  color: #666666;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  background-color: #fcf6db;\r
+  border: 1px solid #e5e0c6;\r
+  padding: 10px;\r
+  margin: 0 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown pre code {\r
+  line-height: 1.6em;\r
+}\r
+.swagger-section .swagger-ui-wrap div.gist {\r
+  margin: 20px 0 25px 0 !important;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources {\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource {\r
+  border-bottom: 1px solid #dddddd;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a {\r
+  color: #555555;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child {\r
+  border-bottom: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading {\r
+  border: 1px solid transparent;\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options {\r
+  overflow: hidden;\r
+  padding: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  margin: 14px 10px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li {\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 2px 10px;\r
+  border-right: 1px solid #dddddd;\r
+  color: #666666;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a {\r
+  color: #aaaaaa;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover {\r
+  text-decoration: underline;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {\r
+  color: #999999;\r
+  padding-left: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  font-family: "Droid Sans", sans-serif;\r
+  font-weight: bold;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {\r
+  color: #999999;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+  margin: 0 0 10px;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  width: auto;\r
+  margin: 0;\r
+  padding: 0;\r
+  line-height: 1.1em;\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path {\r
+  padding-left: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a {\r
+  color: black;\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated {\r
+  text-decoration: line-through;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  text-decoration: none;\r
+  color: white;\r
+  display: inline-block;\r
+  width: 50px;\r
+  font-size: 0.7em;\r
+  text-align: center;\r
+  padding: 7px 0 4px;\r
+  -moz-border-radius: 2px;\r
+  -webkit-border-radius: 2px;\r
+  -o-border-radius: 2px;\r
+  -ms-border-radius: 2px;\r
+  -khtml-border-radius: 2px;\r
+  border-radius: 2px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span {\r
+  margin: 0;\r
+  padding: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options {\r
+  overflow: hidden;\r
+  padding: 0;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+  margin: 6px 10px 0 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li {\r
+  float: left;\r
+  clear: none;\r
+  margin: 0;\r
+  padding: 2px 10px;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content {\r
+  border-top: none;\r
+  padding: 10px;\r
+  -moz-border-radius-bottomleft: 6px;\r
+  -webkit-border-bottom-left-radius: 6px;\r
+  -o-border-bottom-left-radius: 6px;\r
+  -ms-border-bottom-left-radius: 6px;\r
+  -khtml-border-bottom-left-radius: 6px;\r
+  border-bottom-left-radius: 6px;\r
+  -moz-border-radius-bottomright: 6px;\r
+  -webkit-border-bottom-right-radius: 6px;\r
+  -o-border-bottom-right-radius: 6px;\r
+  -ms-border-bottom-right-radius: 6px;\r
+  -khtml-border-bottom-right-radius: 6px;\r
+  border-bottom-right-radius: 6px;\r
+  margin: 0 0 20px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 {\r
+  font-size: 1.1em;\r
+  margin: 0;\r
+  padding: 15px 0 5px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header {\r
+  float: none;\r
+  clear: both;\r
+  overflow: hidden;\r
+  display: block;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a {\r
+  padding: 4px 0 0 10px;\r
+  display: inline-block;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit {\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  padding: 6px 8px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber {\r
+  background-image: url('../images/throbber.gif');\r
+  width: 128px;\r
+  height: 16px;\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error {\r
+  outline: 2px solid black;\r
+  outline-color: #cc0000;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] {\r
+  max-width: 300px;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre {\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  padding: 10px;\r
+  font-size: 0.9em;\r
+  max-height: 400px;\r
+  overflow-y: auto;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading {\r
+  background-color: #f9f2e9;\r
+  border: 1px solid #f0e0ca;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a {\r
+  background-color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #f0e0ca;\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a {\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content {\r
+  background-color: #faf5ee;\r
+  border: 1px solid #f0e0ca;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 {\r
+  color: #c5862b;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a {\r
+  color: #dcb67f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading {\r
+  background-color: #fcffcd;\r
+  border: 1px solid black;\r
+  border-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  background-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #ffd20f;\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a {\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content {\r
+  background-color: #fcffcd;\r
+  border: 1px solid black;\r
+  border-color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 {\r
+  color: #ffd20f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a {\r
+  color: #6fc992;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading {\r
+  background-color: #f5e8e8;\r
+  border: 1px solid #e8c6c7;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a {\r
+  text-transform: uppercase;\r
+  background-color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #e8c6c7;\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a {\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {\r
+  background-color: #f7eded;\r
+  border: 1px solid #e8c6c7;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 {\r
+  color: #a41e22;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a {\r
+  color: #c8787a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading {\r
+  background-color: #e7f6ec;\r
+  border: 1px solid #c3e8d1;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a {\r
+  background-color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3e8d1;\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a {\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content {\r
+  background-color: #ebf7f0;\r
+  border: 1px solid #c3e8d1;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 {\r
+  color: #10a54a;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a {\r
+  color: #6fc992;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading {\r
+  background-color: #FCE9E3;\r
+  border: 1px solid #F5D5C3;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a {\r
+  background-color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #f0cecb;\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a {\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content {\r
+  background-color: #faf0ef;\r
+  border: 1px solid #f0cecb;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 {\r
+  color: #D38042;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a {\r
+  color: #dcb67f;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading {\r
+  background-color: #e7f0f7;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a {\r
+  background-color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3d9ec;\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a {\r
+  color: #6fa5d2;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading {\r
+  background-color: #e7f0f7;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a {\r
+  background-color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li {\r
+  border-right: 1px solid #dddddd;\r
+  border-right-color: #c3d9ec;\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 {\r
+  color: #0f6ab4;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a {\r
+  color: #6fa5d2;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content {\r
+  border-top: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last {\r
+  padding-right: 0;\r
+  border-right: none;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active {\r
+  text-decoration: underline;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child,\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first {\r
+  padding-left: 0;\r
+}\r
+.swagger-section .swagger-ui-wrap p#colophon {\r
+  margin: 0 15px 40px 15px;\r
+  padding: 10px 0;\r
+  font-size: 0.8em;\r
+  border-top: 1px solid #dddddd;\r
+  font-family: "Droid Sans", sans-serif;\r
+  color: #999999;\r
+  font-style: italic;\r
+}\r
+.swagger-section .swagger-ui-wrap p#colophon a {\r
+  text-decoration: none;\r
+  color: #547f00;\r
+}\r
+.swagger-section .swagger-ui-wrap h3 {\r
+  color: black;\r
+  font-size: 1.1em;\r
+  padding: 10px 0 10px 0;\r
+}\r
+.swagger-section .swagger-ui-wrap .markdown ol,\r
+.swagger-section .swagger-ui-wrap .markdown ul {\r
+  font-family: "Droid Sans", sans-serif;\r
+  margin: 5px 0 10px;\r
+  padding: 0 0 0 18px;\r
+  list-style-type: disc;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box {\r
+  background-color: #ebf3f9;\r
+  border: 1px solid #c3d9ec;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box label {\r
+  color: #0f6ab4 !important;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box input[type=submit] {\r
+  display: block;\r
+  padding: 10px;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p.weak {\r
+  font-size: 0.8em;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p {\r
+  font-size: 0.9em;\r
+  padding: 0 0 15px;\r
+  color: #7e7b6d;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p a {\r
+  color: #646257;\r
+}\r
+.swagger-section .swagger-ui-wrap form.form_box p strong {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child {\r
+  padding-bottom: 0;\r
+}\r
+.swagger-section .title {\r
+  font-style: bold;\r
+}\r
+.swagger-section .secondary_form {\r
+  display: none;\r
+}\r
+.swagger-section .main_image {\r
+  display: block;\r
+  margin-left: auto;\r
+  margin-right: auto;\r
+}\r
+.swagger-section .oauth_body {\r
+  margin-left: 100px;\r
+  margin-right: 100px;\r
+}\r
+.swagger-section .oauth_submit {\r
+  text-align: center;\r
+  display: inline-block;\r
+}\r
+.swagger-section .authorize-wrapper {\r
+  margin: 15px 0 10px;\r
+}\r
+.swagger-section .authorize-wrapper_operation {\r
+  float: right;\r
+}\r
+.swagger-section .authorize__btn:hover {\r
+  text-decoration: underline;\r
+  cursor: pointer;\r
+}\r
+.swagger-section .authorize__btn_operation:hover .authorize-scopes {\r
+  display: block;\r
+}\r
+.swagger-section .authorize-scopes {\r
+  position: absolute;\r
+  margin-top: 20px;\r
+  background: #FFF;\r
+  border: 1px solid #ccc;\r
+  border-radius: 5px;\r
+  display: none;\r
+  font-size: 13px;\r
+  max-width: 300px;\r
+  line-height: 30px;\r
+  color: black;\r
+  padding: 5px;\r
+}\r
+.swagger-section .authorize-scopes .authorize__scope {\r
+  text-decoration: none;\r
+}\r
+.swagger-section .authorize__btn_operation {\r
+  height: 18px;\r
+  vertical-align: middle;\r
+  display: inline-block;\r
+  background: url(../images/explorer_icons.png) no-repeat;\r
+}\r
+.swagger-section .authorize__btn_operation_login {\r
+  background-position: 0 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section .authorize__btn_operation_logout {\r
+  background-position: -30px 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section #auth_container {\r
+  color: #fff;\r
+  display: inline-block;\r
+  border: none;\r
+  padding: 5px;\r
+  width: 87px;\r
+  height: 13px;\r
+}\r
+.swagger-section #auth_container .authorize__btn {\r
+  color: #fff;\r
+}\r
+.swagger-section .auth_container {\r
+  padding: 0 0 10px;\r
+  margin-bottom: 5px;\r
+  border-bottom: solid 1px #CCC;\r
+  font-size: 0.9em;\r
+}\r
+.swagger-section .auth_container .auth__title {\r
+  color: #547f00;\r
+  font-size: 1.2em;\r
+}\r
+.swagger-section .auth_container .basic_auth__label {\r
+  display: inline-block;\r
+  width: 60px;\r
+}\r
+.swagger-section .auth_container .auth__description {\r
+  color: #999999;\r
+  margin-bottom: 5px;\r
+}\r
+.swagger-section .auth_container .auth__button {\r
+  margin-top: 10px;\r
+  height: 30px;\r
+}\r
+.swagger-section .auth_container .key_auth__field {\r
+  margin: 5px 0;\r
+}\r
+.swagger-section .auth_container .key_auth__label {\r
+  display: inline-block;\r
+  width: 60px;\r
+}\r
+.swagger-section .api-popup-dialog {\r
+  position: absolute;\r
+  display: none;\r
+}\r
+.swagger-section .api-popup-dialog-wrapper {\r
+  z-index: 1000;\r
+  width: 500px;\r
+  background: #FFF;\r
+  padding: 20px;\r
+  border: 1px solid #ccc;\r
+  border-radius: 5px;\r
+  font-size: 13px;\r
+  color: #777;\r
+  position: fixed;\r
+  top: 50%;\r
+  left: 50%;\r
+  transform: translate(-50%, -50%);\r
+}\r
+.swagger-section .api-popup-dialog-shadow {\r
+  position: fixed;\r
+  top: 0;\r
+  left: 0;\r
+  width: 100%;\r
+  height: 100%;\r
+  opacity: 0.2;\r
+  background-color: gray;\r
+  z-index: 900;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-title {\r
+  font-size: 24px;\r
+  padding: 10px 0;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-title {\r
+  font-size: 24px;\r
+  padding: 10px 0;\r
+}\r
+.swagger-section .api-popup-dialog .error-msg {\r
+  padding-left: 5px;\r
+  padding-bottom: 5px;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-content {\r
+  max-height: 500px;\r
+  overflow-y: auto;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-authbtn {\r
+  height: 30px;\r
+}\r
+.swagger-section .api-popup-dialog .api-popup-cancel {\r
+  height: 30px;\r
+}\r
+.swagger-section .api-popup-scopes {\r
+  padding: 10px 20px;\r
+}\r
+.swagger-section .api-popup-scopes li {\r
+  padding: 5px 0;\r
+  line-height: 20px;\r
+}\r
+.swagger-section .api-popup-scopes li input {\r
+  position: relative;\r
+  top: 2px;\r
+}\r
+.swagger-section .api-popup-scopes .api-scope-desc {\r
+  padding-left: 20px;\r
+  font-style: italic;\r
+}\r
+.swagger-section .api-popup-actions {\r
+  padding-top: 10px;\r
+}\r
+.swagger-section .access {\r
+  float: right;\r
+}\r
+.swagger-section .auth {\r
+  float: right;\r
+}\r
+.swagger-section .api-ic {\r
+  height: 18px;\r
+  vertical-align: middle;\r
+  display: inline-block;\r
+  background: url(../images/explorer_icons.png) no-repeat;\r
+}\r
+.swagger-section .api-ic .api_information_panel {\r
+  position: relative;\r
+  margin-top: 20px;\r
+  margin-left: -5px;\r
+  background: #FFF;\r
+  border: 1px solid #ccc;\r
+  border-radius: 5px;\r
+  display: none;\r
+  font-size: 13px;\r
+  max-width: 300px;\r
+  line-height: 30px;\r
+  color: black;\r
+  padding: 5px;\r
+}\r
+.swagger-section .api-ic .api_information_panel p .api-msg-enabled {\r
+  color: green;\r
+}\r
+.swagger-section .api-ic .api_information_panel p .api-msg-disabled {\r
+  color: red;\r
+}\r
+.swagger-section .api-ic:hover .api_information_panel {\r
+  position: absolute;\r
+  display: block;\r
+}\r
+.swagger-section .ic-info {\r
+  background-position: 0 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section .ic-warning {\r
+  background-position: -60px 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section .ic-error {\r
+  background-position: -30px 0;\r
+  width: 18px;\r
+  margin-top: -6px;\r
+  margin-left: 4px;\r
+}\r
+.swagger-section .ic-off {\r
+  background-position: -90px 0;\r
+  width: 58px;\r
+  margin-top: -4px;\r
+  cursor: pointer;\r
+}\r
+.swagger-section .ic-on {\r
+  background-position: -160px 0;\r
+  width: 58px;\r
+  margin-top: -4px;\r
+  cursor: pointer;\r
+}\r
+.swagger-section #header {\r
+  background-color: #89bf04;\r
+  padding: 9px 14px 19px 14px;\r
+  height: 23px;\r
+  min-width: 775px;\r
+}\r
+.swagger-section #input_baseUrl {\r
+  width: 400px;\r
+}\r
+.swagger-section #api_selector {\r
+  display: block;\r
+  clear: none;\r
+  float: right;\r
+}\r
+.swagger-section #api_selector .input {\r
+  display: inline-block;\r
+  clear: none;\r
+  margin: 0 10px 0 0;\r
+}\r
+.swagger-section #api_selector input {\r
+  font-size: 0.9em;\r
+  padding: 3px;\r
+  margin: 0;\r
+}\r
+.swagger-section #input_apiKey {\r
+  width: 200px;\r
+}\r
+.swagger-section #explore,\r
+.swagger-section #auth_container .authorize__btn {\r
+  display: block;\r
+  text-decoration: none;\r
+  font-weight: bold;\r
+  padding: 6px 8px;\r
+  font-size: 0.9em;\r
+  color: white;\r
+  background-color: #547f00;\r
+  -moz-border-radius: 4px;\r
+  -webkit-border-radius: 4px;\r
+  -o-border-radius: 4px;\r
+  -ms-border-radius: 4px;\r
+  -khtml-border-radius: 4px;\r
+  border-radius: 4px;\r
+}\r
+.swagger-section #explore:hover,\r
+.swagger-section #auth_container .authorize__btn:hover {\r
+  background-color: #547f00;\r
+}\r
+.swagger-section #header #logo {\r
+  font-size: 1.5em;\r
+  font-weight: bold;\r
+  text-decoration: none;\r
+  color: white;\r
+}\r
+.swagger-section #header #logo .logo__img {\r
+  display: block;\r
+  float: left;\r
+  margin-top: 2px;\r
+}\r
+.swagger-section #header #logo .logo__title {\r
+  display: inline-block;\r
+  padding: 5px 0 0 10px;\r
+}\r
+.swagger-section #content_message {\r
+  margin: 10px 15px;\r
+  font-style: italic;\r
+  color: #999999;\r
+}\r
+.swagger-section #message-bar {\r
+  min-height: 30px;\r
+  text-align: center;\r
+  padding-top: 10px;\r
+}\r
+.swagger-section .swagger-collapse:before {\r
+  content: "-";\r
+}\r
+.swagger-section .swagger-expand:before {\r
+  content: "+";\r
+}\r
+.swagger-section .error {\r
+  outline-color: #cc0000;\r
+  background-color: #f2dede;\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css
new file mode 100644 (file)
index 0000000..2312a6c
--- /dev/null
@@ -0,0 +1,250 @@
+.swagger-section #header a#logo {\r
+  font-size: 1.5em;\r
+  font-weight: bold;\r
+  text-decoration: none;\r
+  background: transparent url(../images/logo.png) no-repeat left center;\r
+  padding: 20px 0 20px 40px;\r
+}\r
+#text-head {\r
+  font-size: 80px;\r
+  font-family: 'Roboto', sans-serif;\r
+  color: #ffffff;\r
+  float: right;\r
+  margin-right: 20%;\r
+}\r
+.navbar-fixed-top .navbar-nav {\r
+  height: auto;\r
+}\r
+.navbar-fixed-top .navbar-brand {\r
+  height: auto;\r
+}\r
+.navbar-header {\r
+  height: auto;\r
+}\r
+.navbar-inverse {\r
+  background-color: #000;\r
+  border-color: #000;\r
+}\r
+#navbar-brand {\r
+  margin-left: 20%;\r
+}\r
+.navtext {\r
+  font-size: 10px;\r
+}\r
+.h1,\r
+h1 {\r
+  font-size: 60px;\r
+}\r
+.navbar-default .navbar-header .navbar-brand {\r
+  color: #a2dfee;\r
+}\r
+/* tag titles */\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a {\r
+  color: #393939;\r
+  font-family: 'Arvo', serif;\r
+  font-size: 1.5em;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover {\r
+  color: black;\r
+}\r
+.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 {\r
+  color: #525252;\r
+  padding-left: 0px;\r
+  display: block;\r
+  clear: none;\r
+  float: left;\r
+  font-family: 'Arvo', serif;\r
+  font-weight: bold;\r
+}\r
+.navbar-default .navbar-collapse,\r
+.navbar-default .navbar-form {\r
+  border-color: #0A0A0A;\r
+}\r
+.container1 {\r
+  width: 1500px;\r
+  margin: auto;\r
+  margin-top: 0;\r
+  background-image: url('../images/shield.png');\r
+  background-repeat: no-repeat;\r
+  background-position: -40px -20px;\r
+  margin-bottom: 210px;\r
+}\r
+.container-inner {\r
+  width: 1200px;\r
+  margin: auto;\r
+  background-color: rgba(223, 227, 228, 0.75);\r
+  padding-bottom: 40px;\r
+  padding-top: 40px;\r
+  border-radius: 15px;\r
+}\r
+.header-content {\r
+  padding: 0;\r
+  width: 1000px;\r
+}\r
+.title1 {\r
+  font-size: 80px;\r
+  font-family: 'Vollkorn', serif;\r
+  color: #404040;\r
+  text-align: center;\r
+  padding-top: 40px;\r
+  padding-bottom: 100px;\r
+}\r
+#icon {\r
+  margin-top: -18px;\r
+}\r
+.subtext {\r
+  font-size: 25px;\r
+  font-style: italic;\r
+  color: #08b;\r
+  text-align: right;\r
+  padding-right: 250px;\r
+}\r
+.bg-primary {\r
+  background-color: #00468b;\r
+}\r
+.navbar-default .nav > li > a,\r
+.navbar-default .nav > li > a:focus {\r
+  color: #08b;\r
+}\r
+.navbar-default .nav > li > a,\r
+.navbar-default .nav > li > a:hover {\r
+  color: #08b;\r
+}\r
+.navbar-default .nav > li > a,\r
+.navbar-default .nav > li > a:focus:hover {\r
+  color: #08b;\r
+}\r
+.text-faded {\r
+  font-size: 25px;\r
+  font-family: 'Vollkorn', serif;\r
+}\r
+.section-heading {\r
+  font-family: 'Vollkorn', serif;\r
+  font-size: 45px;\r
+  padding-bottom: 10px;\r
+}\r
+hr {\r
+  border-color: #00468b;\r
+  padding-bottom: 10px;\r
+}\r
+.description {\r
+  margin-top: 20px;\r
+  padding-bottom: 200px;\r
+}\r
+.description li {\r
+  font-family: 'Vollkorn', serif;\r
+  font-size: 25px;\r
+  color: #525252;\r
+  margin-left: 28%;\r
+  padding-top: 5px;\r
+}\r
+.gap {\r
+  margin-top: 200px;\r
+}\r
+.troubleshootingtext {\r
+  color: rgba(255, 255, 255, 0.7);\r
+  padding-left: 30%;\r
+}\r
+.troubleshootingtext li {\r
+  list-style-type: circle;\r
+  font-size: 25px;\r
+  padding-bottom: 5px;\r
+}\r
+.overlay {\r
+  position: absolute;\r
+  top: 0;\r
+  left: 0;\r
+  width: 100%;\r
+  height: 100%;\r
+  z-index: 1000;\r
+}\r
+.block.response_body.json:hover {\r
+  cursor: pointer;\r
+}\r
+.backdrop {\r
+  color: blue;\r
+}\r
+#myModal {\r
+  height: 100%;\r
+}\r
+.modal-backdrop {\r
+  bottom: 0;\r
+  position: fixed;\r
+}\r
+.curl {\r
+  padding: 10px;\r
+  font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace;\r
+  font-size: 0.9em;\r
+  max-height: 400px;\r
+  margin-top: 5px;\r
+  overflow-y: auto;\r
+  background-color: #fcf6db;\r
+  border: 1px solid #e5e0c6;\r
+  border-radius: 4px;\r
+}\r
+.curl_title {\r
+  font-size: 1.1em;\r
+  margin: 0;\r
+  padding: 15px 0 5px;\r
+  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;\r
+  font-weight: 500;\r
+  line-height: 1.1;\r
+}\r
+.footer {\r
+  display: none;\r
+}\r
+.swagger-section .swagger-ui-wrap h2 {\r
+  padding: 0;\r
+}\r
+h2 {\r
+  margin: 0;\r
+  margin-bottom: 5px;\r
+}\r
+.markdown p {\r
+  font-size: 15px;\r
+  font-family: 'Arvo', serif;\r
+}\r
+.swagger-section .swagger-ui-wrap .code {\r
+  font-size: 15px;\r
+  font-family: 'Arvo', serif;\r
+}\r
+.swagger-section .swagger-ui-wrap b {\r
+  font-family: 'Arvo', serif;\r
+}\r
+#signin:hover {\r
+  cursor: pointer;\r
+}\r
+.dropdown-menu {\r
+  padding: 15px;\r
+}\r
+.navbar-right .dropdown-menu {\r
+  left: 0;\r
+  right: auto;\r
+}\r
+#signinbutton {\r
+  width: 100%;\r
+  height: 32px;\r
+  font-size: 13px;\r
+  font-weight: bold;\r
+  color: #08b;\r
+}\r
+.navbar-default .nav > li .details {\r
+  color: #000000;\r
+  text-transform: none;\r
+  font-size: 15px;\r
+  font-weight: normal;\r
+  font-family: 'Open Sans', sans-serif;\r
+  font-style: italic;\r
+  line-height: 20px;\r
+  top: -2px;\r
+}\r
+.navbar-default .nav > li .details:hover {\r
+  color: black;\r
+}\r
+#signout {\r
+  width: 100%;\r
+  height: 32px;\r
+  font-size: 13px;\r
+  font-weight: bold;\r
+  color: #08b;\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css
new file mode 100644 (file)
index 0000000..cdc330d
--- /dev/null
@@ -0,0 +1,14 @@
+/* Google Font's Droid Sans */\r
+@font-face {\r
+  font-family: 'Droid Sans';\r
+  font-style: normal;\r
+  font-weight: 400;\r
+  src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype');\r
+}\r
+/* Google Font's Droid Sans Bold */\r
+@font-face {\r
+  font-family: 'Droid Sans';\r
+  font-style: normal;\r
+  font-weight: 700;\r
+  src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype');\r
+}\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf
new file mode 100644 (file)
index 0000000..036c4d1
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf
new file mode 100644 (file)
index 0000000..e517a0c
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif
new file mode 100644 (file)
index 0000000..8843e8c
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif
new file mode 100644 (file)
index 0000000..477bf13
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png
new file mode 100644 (file)
index 0000000..ed9d2ff
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png
new file mode 100644 (file)
index 0000000..66b1a5b
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png
new file mode 100644 (file)
index 0000000..32f319f
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico
new file mode 100644 (file)
index 0000000..8b60bcf
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png
new file mode 100644 (file)
index 0000000..5496a65
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png
new file mode 100644 (file)
index 0000000..f9f9cd4
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif
new file mode 100644 (file)
index 0000000..0639388
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png
new file mode 100644 (file)
index 0000000..dca4f14
Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png differ
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html
new file mode 100644 (file)
index 0000000..20c6c81
--- /dev/null
@@ -0,0 +1,107 @@
+<!DOCTYPE html>\r
+<html>\r
+<head>\r
+  <meta charset="UTF-8">\r
+  <title>Swagger UI</title>\r
+  <link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />\r
+  <link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />\r
+  <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>\r
+  <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>\r
+  <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>\r
+  <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>\r
+  <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>\r
+  <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>\r
+  <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>\r
+  <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>\r
+  <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>\r
+  <script src='lib/handlebars-2.0.0.js' type='text/javascript'></script>\r
+  <script src='lib/js-yaml.min.js' type='text/javascript'></script>\r
+  <script src='lib/lodash.min.js' type='text/javascript'></script>\r
+  <script src='lib/backbone-min.js' type='text/javascript'></script>\r
+  <script src='swagger-ui.js' type='text/javascript'></script>\r
+  <script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>\r
+  <script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>\r
+  <script src='lib/jsoneditor.min.js' type='text/javascript'></script>\r
+  <script src='lib/marked.js' type='text/javascript'></script>\r
+  <script src='lib/swagger-oauth.js' type='text/javascript'></script>\r
+\r
+  <!-- Some basic translations -->\r
+  <!-- <script src='lang/translator.js' type='text/javascript'></script> -->\r
+  <!-- <script src='lang/ru.js' type='text/javascript'></script> -->\r
+  <!-- <script src='lang/en.js' type='text/javascript'></script> -->\r
+\r
+  <script type="text/javascript">\r
+    $(function () {\r
+      var url = window.location.search.match(/url=([^&]+)/);\r
+      if (url && url.length > 1) {\r
+        url = decodeURIComponent(url[1]);\r
+      } else {\r
+          url = "../swagger.json";\r
+        //url = "http://petstore.swagger.io/v2/swagger.json";\r
+      }\r
+\r
+      hljs.configure({\r
+        highlightSizeThreshold: 5000\r
+      });\r
+\r
+      // Pre load translate...\r
+      if(window.SwaggerTranslator) {\r
+        window.SwaggerTranslator.translate();\r
+      }\r
+      window.swaggerUi = new SwaggerUi({\r
+        url: url,\r
+               validatorUrl: null,\r
+        dom_id: "swagger-ui-container",\r
+        supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],\r
+        onComplete: function(swaggerApi, swaggerUi){\r
+          if(typeof initOAuth == "function") {\r
+            initOAuth({\r
+              clientId: "your-client-id",\r
+              clientSecret: "your-client-secret-if-required",\r
+              realm: "your-realms",\r
+              appName: "your-app-name",\r
+              scopeSeparator: ",",\r
+              additionalQueryStringParams: {}\r
+            });\r
+          }\r
+\r
+          if(window.SwaggerTranslator) {\r
+            window.SwaggerTranslator.translate();\r
+          }\r
+        },\r
+        onFailure: function(data) {\r
+          log("Unable to Load SwaggerUI");\r
+        },\r
+        docExpansion: "none",\r
+        jsonEditor: false,\r
+        defaultModelRendering: 'schema',\r
+        showRequestHeaders: false\r
+      });\r
+\r
+      window.swaggerUi.load();\r
+\r
+      function log() {\r
+        if ('console' in window) {\r
+          console.log.apply(console, arguments);\r
+        }\r
+      }\r
+  });\r
+  </script>\r
+</head>\r
+\r
+<body class="swagger-section">\r
+<div id='header'>\r
+  <div class="swagger-ui-wrap">\r
+    <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>\r
+    <form id='api_selector'>\r
+      <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>\r
+      <div id='auth_container'></div>\r
+      <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>\r
+    </form>\r
+  </div>\r
+</div>\r
+\r
+<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>\r
+<div id="swagger-ui-container" class="swagger-ui-wrap"></div>\r
+</body>\r
+</html>\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js
new file mode 100644 (file)
index 0000000..afddab1
--- /dev/null
@@ -0,0 +1,56 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Warning: Deprecated",\r
+    "Implementation Notes":"Implementation Notes",\r
+    "Response Class":"Response Class",\r
+    "Status":"Status",\r
+    "Parameters":"Parameters",\r
+    "Parameter":"Parameter",\r
+    "Value":"Value",\r
+    "Description":"Description",\r
+    "Parameter Type":"Parameter Type",\r
+    "Data Type":"Data Type",\r
+    "Response Messages":"Response Messages",\r
+    "HTTP Status Code":"HTTP Status Code",\r
+    "Reason":"Reason",\r
+    "Response Model":"Response Model",\r
+    "Request URL":"Request URL",\r
+    "Response Body":"Response Body",\r
+    "Response Code":"Response Code",\r
+    "Response Headers":"Response Headers",\r
+    "Hide Response":"Hide Response",\r
+    "Headers":"Headers",\r
+    "Try it out!":"Try it out!",\r
+    "Show/Hide":"Show/Hide",\r
+    "List Operations":"List Operations",\r
+    "Expand Operations":"Expand Operations",\r
+    "Raw":"Raw",\r
+    "can't parse JSON.  Raw result":"can't parse JSON.  Raw result",\r
+    "Example Value":"Example Value",\r
+    "Model Schema":"Model Schema",\r
+    "Model":"Model",\r
+    "Click to set as parameter value":"Click to set as parameter value",\r
+    "apply":"apply",\r
+    "Username":"Username",\r
+    "Password":"Password",\r
+    "Terms of service":"Terms of service",\r
+    "Created by":"Created by",\r
+    "See more at":"See more at",\r
+    "Contact the developer":"Contact the developer",\r
+    "api version":"api version",\r
+    "Response Content Type":"Response Content Type",\r
+    "Parameter content type:":"Parameter content type:",\r
+    "fetching resource":"fetching resource",\r
+    "fetching resource list":"fetching resource list",\r
+    "Explore":"Explore",\r
+    "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Can't read from server.  It may not have the appropriate access-control-origin settings.",\r
+    "Please specify the protocol for":"Please specify the protocol for",\r
+    "Can't read swagger JSON from":"Can't read swagger JSON from",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",\r
+    "Unable to read api":"Unable to read api",\r
+    "from path":"from path",\r
+    "server returned":"server returned"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js
new file mode 100644 (file)
index 0000000..634154f
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Advertencia: Obsoleto",\r
+    "Implementation Notes":"Notas de implementación",\r
+    "Response Class":"Clase de la Respuesta",\r
+    "Status":"Status",\r
+    "Parameters":"Parámetros",\r
+    "Parameter":"Parámetro",\r
+    "Value":"Valor",\r
+    "Description":"Descripción",\r
+    "Parameter Type":"Tipo del Parámetro",\r
+    "Data Type":"Tipo del Dato",\r
+    "Response Messages":"Mensajes de la Respuesta",\r
+    "HTTP Status Code":"Código de Status HTTP",\r
+    "Reason":"Razón",\r
+    "Response Model":"Modelo de la Respuesta",\r
+    "Request URL":"URL de la Solicitud",\r
+    "Response Body":"Cuerpo de la Respuesta",\r
+    "Response Code":"Código de la Respuesta",\r
+    "Response Headers":"Encabezados de la Respuesta",\r
+    "Hide Response":"Ocultar Respuesta",\r
+    "Try it out!":"Pruébalo!",\r
+    "Show/Hide":"Mostrar/Ocultar",\r
+    "List Operations":"Listar Operaciones",\r
+    "Expand Operations":"Expandir Operaciones",\r
+    "Raw":"Crudo",\r
+    "can't parse JSON.  Raw result":"no puede parsear el JSON.  Resultado crudo",\r
+    "Example Value":"Valor de Ejemplo",\r
+    "Model Schema":"Esquema del Modelo",\r
+    "Model":"Modelo",\r
+    "apply":"aplicar",\r
+    "Username":"Nombre de usuario",\r
+    "Password":"Contraseña",\r
+    "Terms of service":"Términos de Servicio",\r
+    "Created by":"Creado por",\r
+    "See more at":"Ver más en",\r
+    "Contact the developer":"Contactar al desarrollador",\r
+    "api version":"versión de la api",\r
+    "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta",\r
+    "fetching resource":"buscando recurso",\r
+    "fetching resource list":"buscando lista del recurso",\r
+    "Explore":"Explorar",\r
+    "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.",\r
+    "Please specify the protocol for":"Por favor, especificar el protocola para",\r
+    "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI",\r
+    "Unable to read api":"No se puede leer la api",\r
+    "from path":"desde ruta",\r
+    "server returned":"el servidor retornó"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js
new file mode 100644 (file)
index 0000000..ed5b7da
--- /dev/null
@@ -0,0 +1,54 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Avertissement : Obsolète",\r
+    "Implementation Notes":"Notes d'implémentation",\r
+    "Response Class":"Classe de la réponse",\r
+    "Status":"Statut",\r
+    "Parameters":"Paramètres",\r
+    "Parameter":"Paramètre",\r
+    "Value":"Valeur",\r
+    "Description":"Description",\r
+    "Parameter Type":"Type du paramètre",\r
+    "Data Type":"Type de données",\r
+    "Response Messages":"Messages de la réponse",\r
+    "HTTP Status Code":"Code de statut HTTP",\r
+    "Reason":"Raison",\r
+    "Response Model":"Modèle de réponse",\r
+    "Request URL":"URL appelée",\r
+    "Response Body":"Corps de la réponse",\r
+    "Response Code":"Code de la réponse",\r
+    "Response Headers":"En-têtes de la réponse",\r
+    "Hide Response":"Cacher la réponse",\r
+    "Headers":"En-têtes",\r
+    "Try it out!":"Testez !",\r
+    "Show/Hide":"Afficher/Masquer",\r
+    "List Operations":"Liste des opérations",\r
+    "Expand Operations":"Développer les opérations",\r
+    "Raw":"Brut",\r
+    "can't parse JSON.  Raw result":"impossible de décoder le JSON.  Résultat brut",\r
+    "Example Value":"Exemple la valeur",\r
+    "Model Schema":"Définition du modèle",\r
+    "Model":"Modèle",\r
+    "apply":"appliquer",\r
+    "Username":"Nom d'utilisateur",\r
+    "Password":"Mot de passe",\r
+    "Terms of service":"Conditions de service",\r
+    "Created by":"Créé par",\r
+    "See more at":"Voir plus sur",\r
+    "Contact the developer":"Contacter le développeur",\r
+    "api version":"version de l'api",\r
+    "Response Content Type":"Content Type de la réponse",\r
+    "fetching resource":"récupération de la ressource",\r
+    "fetching resource list":"récupération de la liste de ressources",\r
+    "Explore":"Explorer",\r
+    "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.",\r
+    "Please specify the protocol for":"Veuillez spécifier un protocole pour",\r
+    "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI",\r
+    "Unable to read api":"Impossible de lire l'api",\r
+    "from path":"à partir du chemin",\r
+    "server returned":"réponse du serveur"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js
new file mode 100644 (file)
index 0000000..29c4586
--- /dev/null
@@ -0,0 +1,56 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"ყურადღება: აღარ გამოიყენება",\r
+    "Implementation Notes":"იმპლემენტაციის აღწერა",\r
+    "Response Class":"რესპონს კლასი",\r
+    "Status":"სტატუსი",\r
+    "Parameters":"პარამეტრები",\r
+    "Parameter":"პარამეტრი",\r
+    "Value":"მნიშვნელობა",\r
+    "Description":"აღწერა",\r
+    "Parameter Type":"პარამეტრის ტიპი",\r
+    "Data Type":"მონაცემის ტიპი",\r
+    "Response Messages":"პასუხი",\r
+    "HTTP Status Code":"HTTP სტატუსი",\r
+    "Reason":"მიზეზი",\r
+    "Response Model":"რესპონს მოდელი",\r
+    "Request URL":"მოთხოვნის URL",\r
+    "Response Body":"პასუხის სხეული",\r
+    "Response Code":"პასუხის კოდი",\r
+    "Response Headers":"პასუხის ჰედერები",\r
+    "Hide Response":"დამალე პასუხი",\r
+    "Headers":"ჰედერები",\r
+    "Try it out!":"ცადე !",\r
+    "Show/Hide":"გამოჩენა/დამალვა",\r
+    "List Operations":"ოპერაციების სია",\r
+    "Expand Operations":"ოპერაციები ვრცლად",\r
+    "Raw":"ნედლი",\r
+    "can't parse JSON.  Raw result":"JSON-ის დამუშავება ვერ მოხერხდა.  ნედლი პასუხი",\r
+    "Example Value":"მაგალითი",\r
+    "Model Schema":"მოდელის სტრუქტურა",\r
+    "Model":"მოდელი",\r
+    "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე",\r
+    "apply":"გამოყენება",\r
+    "Username":"მოხმარებელი",\r
+    "Password":"პაროლი",\r
+    "Terms of service":"მომსახურების პირობები",\r
+    "Created by":"შექმნა",\r
+    "See more at":"ნახე ვრცლად",\r
+    "Contact the developer":"დაუკავშირდი დეველოპერს",\r
+    "api version":"api ვერსია",\r
+    "Response Content Type":"პასუხის კონტენტის ტიპი",\r
+    "Parameter content type:":"პარამეტრის კონტენტის ტიპი:",\r
+    "fetching resource":"რესურსების მიღება",\r
+    "fetching resource list":"რესურსების სიის მიღება",\r
+    "Explore":"ნახვა",\r
+    "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება.  შეამოწმეთ access-control-origin.",\r
+    "Please specify the protocol for":"მიუთითეთ პროტოკოლი",\r
+    "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება",\r
+    "Unable to read api":"api წაკითხვა ვერ მოხერხდა",\r
+    "from path":"მისამართიდან",\r
+    "server returned":"სერვერმა დააბრუნა"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js
new file mode 100644 (file)
index 0000000..af9d0dd
--- /dev/null
@@ -0,0 +1,52 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Attenzione: Deprecato",\r
+    "Implementation Notes":"Note di implementazione",\r
+    "Response Class":"Classe della risposta",\r
+    "Status":"Stato",\r
+    "Parameters":"Parametri",\r
+    "Parameter":"Parametro",\r
+    "Value":"Valore",\r
+    "Description":"Descrizione",\r
+    "Parameter Type":"Tipo di parametro",\r
+    "Data Type":"Tipo di dato",\r
+    "Response Messages":"Messaggi della risposta",\r
+    "HTTP Status Code":"Codice stato HTTP",\r
+    "Reason":"Motivo",\r
+    "Response Model":"Modello di risposta",\r
+    "Request URL":"URL della richiesta",\r
+    "Response Body":"Corpo della risposta",\r
+    "Response Code":"Oggetto della risposta",\r
+    "Response Headers":"Intestazioni della risposta",\r
+    "Hide Response":"Nascondi risposta",\r
+    "Try it out!":"Provalo!",\r
+    "Show/Hide":"Mostra/Nascondi",\r
+    "List Operations":"Mostra operazioni",\r
+    "Expand Operations":"Espandi operazioni",\r
+    "Raw":"Grezzo (raw)",\r
+    "can't parse JSON.  Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).",\r
+    "Model Schema":"Schema del modello",\r
+    "Model":"Modello",\r
+    "apply":"applica",\r
+    "Username":"Nome utente",\r
+    "Password":"Password",\r
+    "Terms of service":"Condizioni del servizio",\r
+    "Created by":"Creato da",\r
+    "See more at":"Informazioni aggiuntive:",\r
+    "Contact the developer":"Contatta lo sviluppatore",\r
+    "api version":"versione api",\r
+    "Response Content Type":"Tipo di contenuto (content type) della risposta",\r
+    "fetching resource":"recuperando la risorsa",\r
+    "fetching resource list":"recuperando lista risorse",\r
+    "Explore":"Esplora",\r
+    "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.",\r
+    "Please specify the protocol for":"Si prega di specificare il protocollo per",\r
+    "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata",\r
+    "Unable to read api":"Impossibile leggere la api",\r
+    "from path":"da cartella",\r
+    "server returned":"il server ha restituito"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js
new file mode 100644 (file)
index 0000000..cca27c0
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"警告: 廃止予定",\r
+    "Implementation Notes":"実装メモ",\r
+    "Response Class":"レスポンスクラス",\r
+    "Status":"ステータス",\r
+    "Parameters":"パラメータ群",\r
+    "Parameter":"パラメータ",\r
+    "Value":"値",\r
+    "Description":"説明",\r
+    "Parameter Type":"パラメータタイプ",\r
+    "Data Type":"データタイプ",\r
+    "Response Messages":"レスポンスメッセージ",\r
+    "HTTP Status Code":"HTTPステータスコード",\r
+    "Reason":"理由",\r
+    "Response Model":"レスポンスモデル",\r
+    "Request URL":"リクエストURL",\r
+    "Response Body":"レスポンスボディ",\r
+    "Response Code":"レスポンスコード",\r
+    "Response Headers":"レスポンスヘッダ",\r
+    "Hide Response":"レスポンスを隠す",\r
+    "Headers":"ヘッダ",\r
+    "Try it out!":"実際に実行!",\r
+    "Show/Hide":"表示/非表示",\r
+    "List Operations":"操作一覧",\r
+    "Expand Operations":"操作の展開",\r
+    "Raw":"Raw",\r
+    "can't parse JSON.  Raw result":"JSONへ解釈できません.  未加工の結果",\r
+    "Model Schema":"モデルスキーマ",\r
+    "Model":"モデル",\r
+    "apply":"実行",\r
+    "Username":"ユーザ名",\r
+    "Password":"パスワード",\r
+    "Terms of service":"サービス利用規約",\r
+    "Created by":"Created by",\r
+    "See more at":"See more at",\r
+    "Contact the developer":"開発者に連絡",\r
+    "api version":"APIバージョン",\r
+    "Response Content Type":"レスポンス コンテンツタイプ",\r
+    "fetching resource":"リソースの取得",\r
+    "fetching resource list":"リソース一覧の取得",\r
+    "Explore":"Explore",\r
+    "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"サーバから読み込めません.  適切なaccess-control-origin設定を持っていない可能性があります.",\r
+    "Please specify the protocol for":"プロトコルを指定してください",\r
+    "Can't read swagger JSON from":"次からswagger JSONを読み込めません",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています",\r
+    "Unable to read api":"APIを読み込めません",\r
+    "from path":"次のパスから",\r
+    "server returned":"サーバからの返答"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js
new file mode 100644 (file)
index 0000000..b789ef7
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Uwaga: Wycofane",\r
+    "Implementation Notes":"Uwagi Implementacji",\r
+    "Response Class":"Klasa Odpowiedzi",\r
+    "Status":"Status",\r
+    "Parameters":"Parametry",\r
+    "Parameter":"Parametr",\r
+    "Value":"Wartość",\r
+    "Description":"Opis",\r
+    "Parameter Type":"Typ Parametru",\r
+    "Data Type":"Typ Danych",\r
+    "Response Messages":"Wiadomości Odpowiedzi",\r
+    "HTTP Status Code":"Kod Statusu HTTP",\r
+    "Reason":"Przyczyna",\r
+    "Response Model":"Model Odpowiedzi",\r
+    "Request URL":"URL Wywołania",\r
+    "Response Body":"Treść Odpowiedzi",\r
+    "Response Code":"Kod Odpowiedzi",\r
+    "Response Headers":"Nagłówki Odpowiedzi",\r
+    "Hide Response":"Ukryj Odpowiedź",\r
+    "Headers":"Nagłówki",\r
+    "Try it out!":"Wypróbuj!",\r
+    "Show/Hide":"Pokaż/Ukryj",\r
+    "List Operations":"Lista Operacji",\r
+    "Expand Operations":"Rozwiń Operacje",\r
+    "Raw":"Nieprzetworzone",\r
+    "can't parse JSON.  Raw result":"nie można przetworzyć pliku JSON.  Nieprzetworzone dane",\r
+    "Model Schema":"Schemat Modelu",\r
+    "Model":"Model",\r
+    "apply":"użyj",\r
+    "Username":"Nazwa użytkownika",\r
+    "Password":"Hasło",\r
+    "Terms of service":"Warunki używania",\r
+    "Created by":"Utworzone przez",\r
+    "See more at":"Zobacz więcej na",\r
+    "Contact the developer":"Kontakt z deweloperem",\r
+    "api version":"wersja api",\r
+    "Response Content Type":"Typ Zasobu Odpowiedzi",\r
+    "fetching resource":"ładowanie zasobu",\r
+    "fetching resource list":"ładowanie listy zasobów",\r
+    "Explore":"Eksploruj",\r
+    "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.",\r
+    "Please specify the protocol for":"Proszę podać protokół dla",\r
+    "Can't read swagger JSON from":"Nie można odczytać swagger JSON z",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI",\r
+    "Unable to read api":"Nie można odczytać api",\r
+    "from path":"ze ścieżki",\r
+    "server returned":"serwer zwrócił"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js
new file mode 100644 (file)
index 0000000..344dff5
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Aviso: Depreciado",\r
+    "Implementation Notes":"Notas de Implementação",\r
+    "Response Class":"Classe de resposta",\r
+    "Status":"Status",\r
+    "Parameters":"Parâmetros",\r
+    "Parameter":"Parâmetro",\r
+    "Value":"Valor",\r
+    "Description":"Descrição",\r
+    "Parameter Type":"Tipo de parâmetro",\r
+    "Data Type":"Tipo de dados",\r
+    "Response Messages":"Mensagens de resposta",\r
+    "HTTP Status Code":"Código de status HTTP",\r
+    "Reason":"Razão",\r
+    "Response Model":"Modelo resposta",\r
+    "Request URL":"URL requisição",\r
+    "Response Body":"Corpo da resposta",\r
+    "Response Code":"Código da resposta",\r
+    "Response Headers":"Cabeçalho da resposta",\r
+    "Headers":"Cabeçalhos",\r
+    "Hide Response":"Esconder resposta",\r
+    "Try it out!":"Tente agora!",\r
+    "Show/Hide":"Mostrar/Esconder",\r
+    "List Operations":"Listar operações",\r
+    "Expand Operations":"Expandir operações",\r
+    "Raw":"Cru",\r
+    "can't parse JSON.  Raw result":"Falha ao analisar JSON.  Resulto cru",\r
+    "Model Schema":"Modelo esquema",\r
+    "Model":"Modelo",\r
+    "apply":"Aplicar",\r
+    "Username":"Usuário",\r
+    "Password":"Senha",\r
+    "Terms of service":"Termos do serviço",\r
+    "Created by":"Criado por",\r
+    "See more at":"Veja mais em",\r
+    "Contact the developer":"Contate o desenvolvedor",\r
+    "api version":"Versão api",\r
+    "Response Content Type":"Tipo de conteúdo da resposta",\r
+    "fetching resource":"busca recurso",\r
+    "fetching resource list":"buscando lista de recursos",\r
+    "Explore":"Explorar",\r
+    "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin",\r
+    "Please specify the protocol for":"Por favor especifique o protocolo",\r
+    "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI",\r
+    "Unable to read api":"Não foi possível ler api",\r
+    "from path":"do caminho",\r
+    "server returned":"servidor retornou"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js
new file mode 100644 (file)
index 0000000..92344fc
--- /dev/null
@@ -0,0 +1,56 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Предупреждение: Устарело",\r
+    "Implementation Notes":"Заметки",\r
+    "Response Class":"Пример ответа",\r
+    "Status":"Статус",\r
+    "Parameters":"Параметры",\r
+    "Parameter":"Параметр",\r
+    "Value":"Значение",\r
+    "Description":"Описание",\r
+    "Parameter Type":"Тип параметра",\r
+    "Data Type":"Тип данных",\r
+    "HTTP Status Code":"HTTP код",\r
+    "Reason":"Причина",\r
+    "Response Model":"Структура ответа",\r
+    "Request URL":"URL запроса",\r
+    "Response Body":"Тело ответа",\r
+    "Response Code":"HTTP код ответа",\r
+    "Response Headers":"Заголовки ответа",\r
+    "Hide Response":"Спрятать ответ",\r
+    "Headers":"Заголовки",\r
+    "Response Messages":"Что может прийти в ответ",\r
+    "Try it out!":"Попробовать!",\r
+    "Show/Hide":"Показать/Скрыть",\r
+    "List Operations":"Операции кратко",\r
+    "Expand Operations":"Операции подробно",\r
+    "Raw":"В сыром виде",\r
+    "can't parse JSON.  Raw result":"Не удается распарсить ответ:",\r
+    "Example Value":"Пример",\r
+    "Model Schema":"Структура",\r
+    "Model":"Описание",\r
+    "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра",\r
+    "apply":"применить",\r
+    "Username":"Имя пользователя",\r
+    "Password":"Пароль",\r
+    "Terms of service":"Условия использования",\r
+    "Created by":"Разработано",\r
+    "See more at":"Еще тут",\r
+    "Contact the developer":"Связаться с разработчиком",\r
+    "api version":"Версия API",\r
+    "Response Content Type":"Content Type ответа",\r
+    "Parameter content type:":"Content Type параметра:",\r
+    "fetching resource":"Получение ресурса",\r
+    "fetching resource list":"Получение ресурсов",\r
+    "Explore":"Показать",\r
+    "Show Swagger Petstore Example Apis":"Показать примеры АПИ",\r
+    "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа",\r
+    "Please specify the protocol for":"Пожалуйста, укажите протокол для",\r
+    "Can't read swagger JSON from":"Не получается прочитать swagger json из",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим",\r
+    "Unable to read api":"Не удалось прочитать api",\r
+    "from path":"по адресу",\r
+    "server returned":"сервер сказал"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js
new file mode 100644 (file)
index 0000000..ab07616
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"Uyarı: Deprecated",\r
+    "Implementation Notes":"Gerçekleştirim Notları",\r
+    "Response Class":"Dönen Sınıf",\r
+    "Status":"Statü",\r
+    "Parameters":"Parametreler",\r
+    "Parameter":"Parametre",\r
+    "Value":"Değer",\r
+    "Description":"Açıklama",\r
+    "Parameter Type":"Parametre Tipi",\r
+    "Data Type":"Veri Tipi",\r
+    "Response Messages":"Dönüş Mesajı",\r
+    "HTTP Status Code":"HTTP Statü Kodu",\r
+    "Reason":"Gerekçe",\r
+    "Response Model":"Dönüş Modeli",\r
+    "Request URL":"İstek URL",\r
+    "Response Body":"Dönüş İçeriği",\r
+    "Response Code":"Dönüş Kodu",\r
+    "Response Headers":"Dönüş Üst Bilgileri",\r
+    "Hide Response":"Dönüşü Gizle",\r
+    "Headers":"Üst Bilgiler",\r
+    "Try it out!":"Dene!",\r
+    "Show/Hide":"Göster/Gizle",\r
+    "List Operations":"Operasyonları Listele",\r
+    "Expand Operations":"Operasyonları Aç",\r
+    "Raw":"Ham",\r
+    "can't parse JSON.  Raw result":"JSON çözümlenemiyor.  Ham sonuç",\r
+    "Model Schema":"Model Şema",\r
+    "Model":"Model",\r
+    "apply":"uygula",\r
+    "Username":"Kullanıcı Adı",\r
+    "Password":"Parola",\r
+    "Terms of service":"Servis şartları",\r
+    "Created by":"Oluşturan",\r
+    "See more at":"Daha fazlası için",\r
+    "Contact the developer":"Geliştirici ile İletişime Geçin",\r
+    "api version":"api versiyon",\r
+    "Response Content Type":"Dönüş İçerik Tipi",\r
+    "fetching resource":"kaynak getiriliyor",\r
+    "fetching resource list":"kaynak listesi getiriliyor",\r
+    "Explore":"Keşfet",\r
+    "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.",\r
+    "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz",\r
+    "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor",\r
+    "Unable to read api":"api okunamadı",\r
+    "from path":"yoldan",\r
+    "server returned":"sunucuya dönüldü"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js
new file mode 100644 (file)
index 0000000..3b7c91e
--- /dev/null
@@ -0,0 +1,39 @@
+'use strict';\r
+\r
+/**\r
+ * Translator for documentation pages.\r
+ *\r
+ * To enable translation you should include one of language-files in your index.html\r
+ * after <script src='lang/translator.js' type='text/javascript'></script>.\r
+ * For example - <script src='lang/ru.js' type='text/javascript'></script>\r
+ *\r
+ * If you wish to translate some new texsts you should do two things:\r
+ * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.\r
+ * 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.\r
+ * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.\r
+ *\r
+ */\r
+window.SwaggerTranslator = {\r
+\r
+    _words:[],\r
+\r
+    translate: function(sel) {\r
+      var $this = this;\r
+      sel = sel || '[data-sw-translate]';\r
+\r
+      $(sel).each(function() {\r
+        $(this).html($this._tryTranslate($(this).html()));\r
+\r
+        $(this).val($this._tryTranslate($(this).val()));\r
+        $(this).attr('title', $this._tryTranslate($(this).attr('title')));\r
+      });\r
+    },\r
+\r
+    _tryTranslate: function(word) {\r
+      return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;\r
+    },\r
+\r
+    learn: function(wordsMap) {\r
+      this._words = wordsMap;\r
+    }\r
+};\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js
new file mode 100644 (file)
index 0000000..7b21d3e
--- /dev/null
@@ -0,0 +1,53 @@
+'use strict';\r
+\r
+/* jshint quotmark: double */\r
+window.SwaggerTranslator.learn({\r
+    "Warning: Deprecated":"警告:已过时",\r
+    "Implementation Notes":"实现备注",\r
+    "Response Class":"响应类",\r
+    "Status":"状态",\r
+    "Parameters":"参数",\r
+    "Parameter":"参数",\r
+    "Value":"值",\r
+    "Description":"描述",\r
+    "Parameter Type":"参数类型",\r
+    "Data Type":"数据类型",\r
+    "Response Messages":"响应消息",\r
+    "HTTP Status Code":"HTTP状态码",\r
+    "Reason":"原因",\r
+    "Response Model":"响应模型",\r
+    "Request URL":"请求URL",\r
+    "Response Body":"响应体",\r
+    "Response Code":"响应码",\r
+    "Response Headers":"响应头",\r
+    "Hide Response":"隐藏响应",\r
+    "Headers":"头",\r
+    "Try it out!":"试一下!",\r
+    "Show/Hide":"显示/隐藏",\r
+    "List Operations":"显示操作",\r
+    "Expand Operations":"展开操作",\r
+    "Raw":"原始",\r
+    "can't parse JSON.  Raw result":"无法解析JSON. 原始结果",\r
+    "Model Schema":"模型架构",\r
+    "Model":"模型",\r
+    "apply":"应用",\r
+    "Username":"用户名",\r
+    "Password":"密码",\r
+    "Terms of service":"服务条款",\r
+    "Created by":"创建者",\r
+    "See more at":"查看更多:",\r
+    "Contact the developer":"联系开发者",\r
+    "api version":"api版本",\r
+    "Response Content Type":"响应Content Type",\r
+    "fetching resource":"正在获取资源",\r
+    "fetching resource list":"正在获取资源列表",\r
+    "Explore":"浏览",\r
+    "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis",\r
+    "Can't read from server.  It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。",\r
+    "Please specify the protocol for":"请指定协议:",\r
+    "Can't read swagger JSON from":"无法读取swagger JSON于",\r
+    "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI",\r
+    "Unable to read api":"无法读取api",\r
+    "from path":"从路径",\r
+    "server returned":"服务器返回"\r
+});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js
new file mode 100644 (file)
index 0000000..5b5b0fe
--- /dev/null
@@ -0,0 +1,15 @@
+// Backbone.js 1.1.2\r
+\r
+(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h<u;h++){t=o[h];if(a=this._events[t]){this._events[t]=s=[];if(e||r){for(l=0,f=a.length;l<f;l++){n=a[l];if(e&&e!==n.callback&&e!==n.callback._callback||r&&r!==n.context){s.push(n)}}}if(!s.length)delete this._events[t]}}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var i=this._events[t];var r=this._events.all;if(i)f(i,e);if(r)f(r,arguments);return this},stopListening:function(t,e,r){var s=this._listeningTo;if(!s)return this;var n=!e&&!r;if(!r&&typeof e==="object")r=this;if(t)(s={})[t._listenId]=t;for(var a in s){t=s[a];t.off(e,r,this);if(n||i.isEmpty(t._events))delete this._listeningTo[a]}return this}};var l=/\s+/;var c=function(t,e,i,r){if(!i)return true;if(typeof i==="object"){for(var s in i){t[e].apply(t,[s,i[s]].concat(r))}return false}if(l.test(i)){var n=i.split(l);for(var a=0,o=n.length;a<o;a++){t[e].apply(t,[n[a]].concat(r))}return false}return true};var f=function(t,e){var i,r=-1,s=t.length,n=e[0],a=e[1],o=e[2];switch(e.length){case 0:while(++r<s)(i=t[r]).callback.call(i.ctx);return;case 1:while(++r<s)(i=t[r]).callback.call(i.ctx,n);return;case 2:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a);return;case 3:while(++r<s)(i=t[r]).callback.call(i.ctx,n,a,o);return;default:while(++r<s)(i=t[r]).callback.apply(i.ctx,e);return}};var d={listenTo:"on",listenToOnce:"once"};i.each(d,function(t,e){u[e]=function(e,r,s){var n=this._listeningTo||(this._listeningTo={});var a=e._listenId||(e._listenId=i.uniqueId("l"));n[a]=e;if(!s&&typeof r==="object")s=this;e[t](r,s,this);return this}});u.bind=u.on;u.unbind=u.off;i.extend(e,u);var p=e.Model=function(t,e){var r=t||{};e||(e={});this.cid=i.uniqueId("c");this.attributes={};if(e.collection)this.collection=e.collection;if(e.parse)r=this.parse(r,e)||{};r=i.defaults({},r,i.result(this,"defaults"));this.set(r,e);this.changed={};this.initialize.apply(this,arguments)};i.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(t){return i.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return i.escape(this.get(t))},has:function(t){return this.get(t)!=null},set:function(t,e,r){var s,n,a,o,h,u,l,c;if(t==null)return this;if(typeof t==="object"){n=t;r=e}else{(n={})[t]=e}r||(r={});if(!this._validate(n,r))return false;a=r.unset;h=r.silent;o=[];u=this._changing;this._changing=true;if(!u){this._previousAttributes=i.clone(this.attributes);this.changed={}}c=this.attributes,l=this._previousAttributes;if(this.idAttribute in n)this.id=n[this.idAttribute];for(s in n){e=n[s];if(!i.isEqual(c[s],e))o.push(s);if(!i.isEqual(l[s],e)){this.changed[s]=e}else{delete this.changed[s]}a?delete c[s]:c[s]=e}if(!h){if(o.length)this._pending=r;for(var f=0,d=o.length;f<d;f++){this.trigger("change:"+o[f],this,c[o[f]],r)}}if(u)return this;if(!h){while(this._pending){r=this._pending;this._pending=false;this.trigger("change",this,r)}}this._pending=false;this._changing=false;return this},unset:function(t,e){return this.set(t,void 0,i.extend({},e,{unset:true}))},clear:function(t){var e={};for(var r in this.attributes)e[r]=void 0;return this.set(e,i.extend({},t,{unset:true}))},hasChanged:function(t){if(t==null)return!i.isEmpty(this.changed);return i.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?i.clone(this.changed):false;var e,r=false;var s=this._changing?this._previousAttributes:this.attributes;for(var n in t){if(i.isEqual(s[n],e=t[n]))continue;(r||(r={}))[n]=e}return r},previous:function(t){if(t==null||!this._previousAttributes)return null;return this._previousAttributes[t]},previousAttributes:function(){return i.clone(this._previousAttributes)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=this;var r=t.success;t.success=function(i){if(!e.set(e.parse(i,t),t))return false;if(r)r(e,i,t);e.trigger("sync",e,i,t)};q(this,t);return this.sync("read",this,t)},save:function(t,e,r){var s,n,a,o=this.attributes;if(t==null||typeof t==="object"){s=t;r=e}else{(s={})[t]=e}r=i.extend({validate:true},r);if(s&&!r.wait){if(!this.set(s,r))return false}else{if(!this._validate(s,r))return false}if(s&&r.wait){this.attributes=i.extend({},o,s)}if(r.parse===void 0)r.parse=true;var h=this;var u=r.success;r.success=function(t){h.attributes=o;var e=h.parse(t,r);if(r.wait)e=i.extend(s||{},e);if(i.isObject(e)&&!h.set(e,r)){return false}if(u)u(h,t,r);h.trigger("sync",h,t,r)};q(this,r);n=this.isNew()?"create":r.patch?"patch":"update";if(n==="patch")r.attrs=s;a=this.sync(n,this,r);if(s&&r.wait)this.attributes=o;return a},destroy:function(t){t=t?i.clone(t):{};var e=this;var r=t.success;var s=function(){e.trigger("destroy",e,e.collection,t)};t.success=function(i){if(t.wait||e.isNew())s();if(r)r(e,i,t);if(!e.isNew())e.trigger("sync",e,i,t)};if(this.isNew()){t.success();return false}q(this,t);var n=this.sync("delete",this,t);if(!t.wait)s();return n},url:function(){var t=i.result(this,"urlRoot")||i.result(this.collection,"url")||M();if(this.isNew())return t;return t.replace(/([^\/])$/,"$1/")+encodeURIComponent(this.id)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},i.extend(t||{},{validate:true}))},_validate:function(t,e){if(!e.validate||!this.validate)return true;t=i.extend({},this.attributes,t);var r=this.validationError=this.validate(t,e)||null;if(!r)return true;this.trigger("invalid",this,r,i.extend(e,{validationError:r}));return false}});var v=["keys","values","pairs","invert","pick","omit"];i.each(v,function(t){p.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.attributes);return i[t].apply(i,e)}});var g=e.Collection=function(t,e){e||(e={});if(e.model)this.model=e.model;if(e.comparator!==void 0)this.comparator=e.comparator;this._reset();this.initialize.apply(this,arguments);if(t)this.reset(t,i.extend({silent:true},e))};var m={add:true,remove:true,merge:true};var y={add:true,remove:false};i.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,i.extend({merge:false},e,y))},remove:function(t,e){var r=!i.isArray(t);t=r?[t]:i.clone(t);e||(e={});var s,n,a,o;for(s=0,n=t.length;s<n;s++){o=t[s]=this.get(t[s]);if(!o)continue;delete this._byId[o.id];delete this._byId[o.cid];a=this.indexOf(o);this.models.splice(a,1);this.length--;if(!e.silent){e.index=a;o.trigger("remove",o,this,e)}this._removeReference(o,e)}return r?t[0]:t},set:function(t,e){e=i.defaults({},e,m);if(e.parse)t=this.parse(t,e);var r=!i.isArray(t);t=r?t?[t]:[]:i.clone(t);var s,n,a,o,h,u,l;var c=e.at;var f=this.model;var d=this.comparator&&c==null&&e.sort!==false;var v=i.isString(this.comparator)?this.comparator:null;var g=[],y=[],_={};var b=e.add,w=e.merge,x=e.remove;var E=!d&&b&&x?[]:false;for(s=0,n=t.length;s<n;s++){h=t[s]||{};if(h instanceof p){a=o=h}else{a=h[f.prototype.idAttribute||"id"]}if(u=this.get(a)){if(x)_[u.cid]=true;if(w){h=h===o?o.attributes:h;if(e.parse)h=u.parse(h,e);u.set(h,e);if(d&&!l&&u.hasChanged(v))l=true}t[s]=u}else if(b){o=t[s]=this._prepareModel(h,e);if(!o)continue;g.push(o);this._addReference(o,e)}o=u||o;if(E&&(o.isNew()||!_[o.id]))E.push(o);_[o.id]=true}if(x){for(s=0,n=this.length;s<n;++s){if(!_[(o=this.models[s]).cid])y.push(o)}if(y.length)this.remove(y,e)}if(g.length||E&&E.length){if(d)l=true;this.length+=g.length;if(c!=null){for(s=0,n=g.length;s<n;s++){this.models.splice(c+s,0,g[s])}}else{if(E)this.models.length=0;var k=E||g;for(s=0,n=k.length;s<n;s++){this.models.push(k[s])}}}if(l)this.sort({silent:true});if(!e.silent){for(s=0,n=g.length;s<n;s++){(o=g[s]).trigger("add",o,this,e)}if(l||E&&E.length)this.trigger("sort",this,e)}return r?t[0]:t},reset:function(t,e){e||(e={});for(var r=0,s=this.models.length;r<s;r++){this._removeReference(this.models[r],e)}e.previousModels=this.models;this._reset();t=this.add(t,i.extend({silent:true},e));if(!e.silent)this.trigger("reset",this,e);return t},push:function(t,e){return this.add(t,i.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);this.remove(e,t);return e},unshift:function(t,e){return this.add(t,i.extend({at:0},e))},shift:function(t){var e=this.at(0);this.remove(e,t);return e},slice:function(){return o.apply(this.models,arguments)},get:function(t){if(t==null)return void 0;return this._byId[t]||this._byId[t.id]||this._byId[t.cid]},at:function(t){return this.models[t]},where:function(t,e){if(i.isEmpty(t))return e?void 0:[];return this[e?"find":"filter"](function(e){for(var i in t){if(t[i]!==e.get(i))return false}return true})},findWhere:function(t){return this.where(t,true)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");t||(t={});if(i.isString(this.comparator)||this.comparator.length===1){this.models=this.sortBy(this.comparator,this)}else{this.models.sort(i.bind(this.comparator,this))}if(!t.silent)this.trigger("sort",this,t);return this},pluck:function(t){return i.invoke(this.models,"get",t)},fetch:function(t){t=t?i.clone(t):{};if(t.parse===void 0)t.parse=true;var e=t.success;var r=this;t.success=function(i){var s=t.reset?"reset":"set";r[s](i,t);if(e)e(r,i,t);r.trigger("sync",r,i,t)};q(this,t);return this.sync("read",this,t)},create:function(t,e){e=e?i.clone(e):{};if(!(t=this._prepareModel(t,e)))return false;if(!e.wait)this.add(t,e);var r=this;var s=e.success;e.success=function(t,i){if(e.wait)r.add(t,e);if(s)s(t,i,e)};t.save(null,e);return t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0;this.models=[];this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t;e=e?i.clone(e):{};e.collection=this;var r=new this.model(t,e);if(!r.validationError)return r;this.trigger("invalid",this,r.validationError,e);return false},_addReference:function(t,e){this._byId[t.cid]=t;if(t.id!=null)this._byId[t.id]=t;if(!t.collection)t.collection=this;t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){if(this===t.collection)delete t.collection;t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,i,r){if((t==="add"||t==="remove")&&i!==this)return;if(t==="destroy")this.remove(e,r);if(e&&t==="change:"+e.idAttribute){delete this._byId[e.previous(e.idAttribute)];if(e.id!=null)this._byId[e.id]=e}this.trigger.apply(this,arguments)}});var _=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","difference","indexOf","shuffle","lastIndexOf","isEmpty","chain","sample"];i.each(_,function(t){g.prototype[t]=function(){var e=o.call(arguments);e.unshift(this.models);return i[t].apply(i,e)}});var b=["groupBy","countBy","sortBy","indexBy"];i.each(b,function(t){g.prototype[t]=function(e,r){var s=i.isFunction(e)?e:function(t){return t.get(e)};return i[t](this.models,s,r)}});var w=e.View=function(t){this.cid=i.uniqueId("view");t||(t={});i.extend(this,i.pick(t,E));this._ensureElement();this.initialize.apply(this,arguments);this.delegateEvents()};var x=/^(\S+)\s*(.*)$/;var E=["model","collection","el","id","attributes","className","tagName","events"];i.extend(w.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){this.$el.remove();this.stopListening();return this},setElement:function(t,i){if(this.$el)this.undelegateEvents();this.$el=t instanceof e.$?t:e.$(t);this.el=this.$el[0];if(i!==false)this.delegateEvents();return this},delegateEvents:function(t){if(!(t||(t=i.result(this,"events"))))return this;this.undelegateEvents();for(var e in t){var r=t[e];if(!i.isFunction(r))r=this[t[e]];if(!r)continue;var s=e.match(x);var n=s[1],a=s[2];r=i.bind(r,this);n+=".delegateEvents"+this.cid;if(a===""){this.$el.on(n,r)}else{this.$el.on(n,a,r)}}return this},undelegateEvents:function(){this.$el.off(".delegateEvents"+this.cid);return this},_ensureElement:function(){if(!this.el){var t=i.extend({},i.result(this,"attributes"));if(this.id)t.id=i.result(this,"id");if(this.className)t["class"]=i.result(this,"className");var r=e.$("<"+i.result(this,"tagName")+">").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('<iframe src="javascript:0" tabindex="-1">');this.iframe=a.hide().appendTo("body")[0].contentWindow;this.navigate(r)}if(this._hasPushState){e.$(window).on("popstate",this.checkUrl)}else if(this._wantsHashChange&&"onhashchange"in window&&!n){e.$(window).on("hashchange",this.checkUrl)}else if(this._wantsHashChange){this._checkUrlInterval=setInterval(this.checkUrl,this.interval)}this.fragment=r;var o=this.location;if(this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){this.fragment=this.getFragment(null,true);this.location.replace(this.root+"#"+this.fragment);return true}else if(this._hasPushState&&this.atRoot()&&o.hash){this.fragment=this.getHash().replace(R,"");this.history.replaceState({},document.title,this.root+this.fragment)}}if(!this.options.silent)return this.loadUrl()},stop:function(){e.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl);if(this._checkUrlInterval)clearInterval(this._checkUrlInterval);N.started=false},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe){e=this.getFragment(this.getHash(this.iframe))}if(e===this.fragment)return false;if(this.iframe)this.navigate(e);this.loadUrl()},loadUrl:function(t){t=this.fragment=this.getFragment(t);return i.any(this.handlers,function(e){if(e.route.test(t)){e.callback(t);return true}})},navigate:function(t,e){if(!N.started)return false;if(!e||e===true)e={trigger:!!e};var i=this.root+(t=this.getFragment(t||""));t=t.replace(j,"");if(this.fragment===t)return;this.fragment=t;if(t===""&&i!=="/")i=i.slice(0,-1);if(this._hasPushState){this.history[e.replace?"replaceState":"pushState"]({},document.title,i)}else if(this._wantsHashChange){this._updateHash(this.location,t,e.replace);if(this.iframe&&t!==this.getFragment(this.getHash(this.iframe))){if(!e.replace)this.iframe.document.open().close();this._updateHash(this.iframe.location,t,e.replace)}}else{return this.location.assign(i)}if(e.trigger)return this.loadUrl(t)},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else{t.hash="#"+e}}});e.history=new N;var U=function(t,e){var r=this;var s;if(t&&i.has(t,"constructor")){s=t.constructor}else{s=function(){return r.apply(this,arguments)}}i.extend(s,r,e);var n=function(){this.constructor=s};n.prototype=r.prototype;s.prototype=new n;if(t)i.extend(s.prototype,t);s.__super__=r.prototype;return s};p.extend=g.extend=$.extend=w.extend=N.extend=U;var M=function(){throw new Error('A "url" property or function must be specified')};var q=function(t,e){var i=e.error;e.error=function(r){if(i)i(t,r,e);t.trigger("error",t,r,e)}};return e});\r
+\r
+// From http://stackoverflow.com/a/19431552\r
+// Compatibility override - Backbone 1.1 got rid of the 'options' binding\r
+// automatically to views in the constructor - we need to keep that.\r
+Backbone.View = (function(View) {\r
+   return View.extend({\r
+        constructor: function(options) {\r
+            this.options = options || {};\r
+            View.apply(this, arguments);\r
+        }\r
+    });\r
+})(Backbone.View);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/handlebars-2.0.0.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/handlebars-2.0.0.js
new file mode 100644 (file)
index 0000000..f4ad17b
--- /dev/null
@@ -0,0 +1,28 @@
+/*!\r
+\r
+ handlebars v2.0.0\r
+\r
+Copyright (C) 2011-2014 by Yehuda Katz\r
+\r
+Permission is hereby granted, free of charge, to any person obtaining a copy\r
+of this software and associated documentation files (the "Software"), to deal\r
+in the Software without restriction, including without limitation the rights\r
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
+copies of the Software, and to permit persons to whom the Software is\r
+furnished to do so, subject to the following conditions:\r
+\r
+The above copyright notice and this permission notice shall be included in\r
+all copies or substantial portions of the Software.\r
+\r
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
+THE SOFTWARE.\r
+\r
+@license\r
+*/\r
+!function(a,b){"function"==typeof define&&define.amd?define([],b):"object"==typeof exports?module.exports=b():a.Handlebars=a.Handlebars||b()}(this,function(){var a=function(){"use strict";function a(a){this.string=a}var b;return a.prototype.toString=function(){return""+this.string},b=a}(),b=function(a){"use strict";function b(a){return i[a]}function c(a){for(var b=1;b<arguments.length;b++)for(var c in arguments[b])Object.prototype.hasOwnProperty.call(arguments[b],c)&&(a[c]=arguments[b][c]);return a}function d(a){return a instanceof h?a.toString():null==a?"":a?(a=""+a,k.test(a)?a.replace(j,b):a):a+""}function e(a){return a||0===a?n(a)&&0===a.length?!0:!1:!0}function f(a,b){return(a?a+".":"")+b}var g={},h=a,i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},j=/[&<>"'`]/g,k=/[&<>"'`]/;g.extend=c;var l=Object.prototype.toString;g.toString=l;var m=function(a){return"function"==typeof a};m(/x/)&&(m=function(a){return"function"==typeof a&&"[object Function]"===l.call(a)});var m;g.isFunction=m;var n=Array.isArray||function(a){return a&&"object"==typeof a?"[object Array]"===l.call(a):!1};return g.isArray=n,g.escapeExpression=d,g.isEmpty=e,g.appendContextPath=f,g}(a),c=function(){"use strict";function a(a,b){var d;b&&b.firstLine&&(d=b.firstLine,a+=" - "+d+":"+b.firstColumn);for(var e=Error.prototype.constructor.call(this,a),f=0;f<c.length;f++)this[c[f]]=e[c[f]];d&&(this.lineNumber=d,this.column=b.firstColumn)}var b,c=["description","fileName","lineNumber","message","name","number","stack"];return a.prototype=new Error,b=a}(),d=function(a,b){"use strict";function c(a,b){this.helpers=a||{},this.partials=b||{},d(this)}function d(a){a.registerHelper("helperMissing",function(){if(1===arguments.length)return void 0;throw new g("Missing helper: '"+arguments[arguments.length-1].name+"'")}),a.registerHelper("blockHelperMissing",function(b,c){var d=c.inverse,e=c.fn;if(b===!0)return e(this);if(b===!1||null==b)return d(this);if(k(b))return b.length>0?(c.ids&&(c.ids=[c.name]),a.helpers.each(b,c)):d(this);if(c.data&&c.ids){var g=q(c.data);g.contextPath=f.appendContextPath(c.data.contextPath,c.name),c={data:g}}return e(b,c)}),a.registerHelper("each",function(a,b){if(!b)throw new g("Must pass iterator to #each");var c,d,e=b.fn,h=b.inverse,i=0,j="";if(b.data&&b.ids&&(d=f.appendContextPath(b.data.contextPath,b.ids[0])+"."),l(a)&&(a=a.call(this)),b.data&&(c=q(b.data)),a&&"object"==typeof a)if(k(a))for(var m=a.length;m>i;i++)c&&(c.index=i,c.first=0===i,c.last=i===a.length-1,d&&(c.contextPath=d+i)),j+=e(a[i],{data:c});else for(var n in a)a.hasOwnProperty(n)&&(c&&(c.key=n,c.index=i,c.first=0===i,d&&(c.contextPath=d+n)),j+=e(a[n],{data:c}),i++);return 0===i&&(j=h(this)),j}),a.registerHelper("if",function(a,b){return l(a)&&(a=a.call(this)),!b.hash.includeZero&&!a||f.isEmpty(a)?b.inverse(this):b.fn(this)}),a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})}),a.registerHelper("with",function(a,b){l(a)&&(a=a.call(this));var c=b.fn;if(f.isEmpty(a))return b.inverse(this);if(b.data&&b.ids){var d=q(b.data);d.contextPath=f.appendContextPath(b.data.contextPath,b.ids[0]),b={data:d}}return c(a,b)}),a.registerHelper("log",function(b,c){var d=c.data&&null!=c.data.level?parseInt(c.data.level,10):1;a.log(d,b)}),a.registerHelper("lookup",function(a,b){return a&&a[b]})}var e={},f=a,g=b,h="2.0.0";e.VERSION=h;var i=6;e.COMPILER_REVISION=i;var j={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};e.REVISION_CHANGES=j;var k=f.isArray,l=f.isFunction,m=f.toString,n="[object Object]";e.HandlebarsEnvironment=c,c.prototype={constructor:c,logger:o,log:p,registerHelper:function(a,b){if(m.call(a)===n){if(b)throw new g("Arg not supported with multiple helpers");f.extend(this.helpers,a)}else this.helpers[a]=b},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){m.call(a)===n?f.extend(this.partials,a):this.partials[a]=b},unregisterPartial:function(a){delete this.partials[a]}};var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];"undefined"!=typeof console&&console[c]&&console[c].call(console,b)}}};e.logger=o;var p=o.log;e.log=p;var q=function(a){var b=f.extend({},a);return b._parent=a,b};return e.createFrame=q,e}(b,c),e=function(a,b,c){"use strict";function d(a){var b=a&&a[0]||1,c=m;if(b!==c){if(c>b){var d=n[c],e=n[b];throw new l("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}throw new l("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+a[1]+").")}}function e(a,b){if(!b)throw new l("No environment passed to template");if(!a||!a.main)throw new l("Unknown template object: "+typeof a);b.VM.checkRevision(a.compiler);var c=function(c,d,e,f,g,h,i,j,m){g&&(f=k.extend({},f,g));var n=b.VM.invokePartial.call(this,c,e,f,h,i,j,m);if(null==n&&b.compile){var o={helpers:h,partials:i,data:j,depths:m};i[e]=b.compile(c,{data:void 0!==j,compat:a.compat},b),n=i[e](f,o)}if(null!=n){if(d){for(var p=n.split("\n"),q=0,r=p.length;r>q&&(p[q]||q+1!==r);q++)p[q]=d+p[q];n=p.join("\n")}return n}throw new l("The partial "+e+" could not be compiled when running in runtime-only mode")},d={lookup:function(a,b){for(var c=a.length,d=0;c>d;d++)if(a[d]&&null!=a[d][b])return a[d][b]},lambda:function(a,b){return"function"==typeof a?a.call(b):a},escapeExpression:k.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);return b||c?d=f(this,a,e,b,c):d||(d=this.programs[a]=f(this,a,e)),d},data:function(a,b){for(;a&&b--;)a=a._parent;return a},merge:function(a,b){var c=a||b;return a&&b&&a!==b&&(c=k.extend({},b,a)),c},noop:b.VM.noop,compilerInfo:a.compiler},e=function(b,c){c=c||{};var f=c.data;e._setup(c),!c.partial&&a.useData&&(f=i(b,f));var g;return a.useDepths&&(g=c.depths?[b].concat(c.depths):[b]),a.main.call(d,b,d.helpers,d.partials,f,g)};return e.isTop=!0,e._setup=function(c){c.partial?(d.helpers=c.helpers,d.partials=c.partials):(d.helpers=d.merge(c.helpers,b.helpers),a.usePartial&&(d.partials=d.merge(c.partials,b.partials)))},e._child=function(b,c,e){if(a.useDepths&&!e)throw new l("must pass parent depths");return f(d,b,a[b],c,e)},e}function f(a,b,c,d,e){var f=function(b,f){return f=f||{},c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};return f.program=b,f.depth=e?e.length:0,f}function g(a,b,c,d,e,f,g){var h={partial:!0,helpers:d,partials:e,data:f,depths:g};if(void 0===a)throw new l("The partial "+b+" could not be found");return a instanceof Function?a(c,h):void 0}function h(){return""}function i(a,b){return b&&"root"in b||(b=b?o(b):{},b.root=a),b}var j={},k=a,l=b,m=c.COMPILER_REVISION,n=c.REVISION_CHANGES,o=c.createFrame;return j.checkRevision=d,j.template=e,j.program=f,j.invokePartial=g,j.noop=h,j}(b,c,d),f=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c,j=d,k=e,l=function(){var a=new g.HandlebarsEnvironment;return j.extend(a,g),a.SafeString=h,a.Exception=i,a.Utils=j,a.escapeExpression=j.escapeExpression,a.VM=k,a.template=function(b){return k.template(b,a)},a},m=l();return m.create=l,m["default"]=m,f=m}(d,a,c,b,e),g=function(a){"use strict";function b(a){a=a||{},this.firstLine=a.first_line,this.firstColumn=a.first_column,this.lastColumn=a.last_column,this.lastLine=a.last_line}var c,d=a,e={ProgramNode:function(a,c,d){b.call(this,d),this.type="program",this.statements=a,this.strip=c},MustacheNode:function(a,c,d,f,g){if(b.call(this,g),this.type="mustache",this.strip=f,null!=d&&d.charAt){var h=d.charAt(3)||d.charAt(2);this.escaped="{"!==h&&"&"!==h}else this.escaped=!!d;this.sexpr=a instanceof e.SexprNode?a:new e.SexprNode(a,c),this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(a,c,d){b.call(this,d),this.type="sexpr",this.hash=c;var e=this.id=a[0],f=this.params=a.slice(1);this.isHelper=!(!f.length&&!c),this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,c,d,e,f){b.call(this,f),this.type="partial",this.partialName=a,this.context=c,this.hash=d,this.strip=e,this.strip.inlineStandalone=!0},BlockNode:function(a,c,d,e,f){b.call(this,f),this.type="block",this.mustache=a,this.program=c,this.inverse=d,this.strip=e,d&&!c&&(this.isInverse=!0)},RawBlockNode:function(a,c,f,g){if(b.call(this,g),a.sexpr.id.original!==f)throw new d(a.sexpr.id.original+" doesn't match "+f,this);c=new e.ContentNode(c,g),this.type="block",this.mustache=a,this.program=new e.ProgramNode([c],{},g)},ContentNode:function(a,c){b.call(this,c),this.type="content",this.original=this.string=a},HashNode:function(a,c){b.call(this,c),this.type="hash",this.pairs=a},IdNode:function(a,c){b.call(this,c),this.type="ID";for(var e="",f=[],g=0,h="",i=0,j=a.length;j>i;i++){var k=a[i].part;if(e+=(a[i].separator||"")+k,".."===k||"."===k||"this"===k){if(f.length>0)throw new d("Invalid path: "+e,this);".."===k?(g++,h+="../"):this.isScoped=!0}else f.push(k)}this.original=e,this.parts=f,this.string=f.join("."),this.depth=g,this.idName=h+this.string,this.isSimple=1===a.length&&!this.isScoped&&0===g,this.stringModeValue=this.string},PartialNameNode:function(a,c){b.call(this,c),this.type="PARTIAL_NAME",this.name=a.original},DataNode:function(a,c){b.call(this,c),this.type="DATA",this.id=a,this.stringModeValue=a.stringModeValue,this.idName="@"+a.stringModeValue},StringNode:function(a,c){b.call(this,c),this.type="STRING",this.original=this.string=this.stringModeValue=a},NumberNode:function(a,c){b.call(this,c),this.type="NUMBER",this.original=this.number=a,this.stringModeValue=Number(a)},BooleanNode:function(a,c){b.call(this,c),this.type="BOOLEAN",this.bool=a,this.stringModeValue="true"===a},CommentNode:function(a,c){b.call(this,c),this.type="comment",this.comment=a,this.strip={inlineStandalone:!0}}};return c=e}(c),h=function(){"use strict";var a,b=function(){function a(){this.yy={}}var b={trace:function(){},yy:{},symbols_:{error:2,root:3,program:4,EOF:5,program_repetition0:6,statement:7,mustache:8,block:9,rawBlock:10,partial:11,CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOCK:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18,openBlock:19,block_option0:20,closeBlock:21,openInverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25,OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OPEN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,CLOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,param:36,partial_option0:37,partial_option1:38,sexpr_repetition0:39,sexpr_option0:40,dataName:41,STRING:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEXPR:46,hash:47,hash_repetition_plus0:48,hashSegment:49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",12:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OPEN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK",25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPEN_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOSE_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUMBER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR",50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(a,b,c,d,e,f){var g=f.length-1;switch(e){case 1:return d.prepareProgram(f[g-1].statements,!0),f[g-1];case 2:this.$=new d.ProgramNode(d.prepareProgram(f[g]),{},this._$);break;case 3:this.$=f[g];break;case 4:this.$=f[g];break;case 5:this.$=f[g];break;case 6:this.$=f[g];break;case 7:this.$=new d.ContentNode(f[g],this._$);break;case 8:this.$=new d.CommentNode(f[g],this._$);break;case 9:this.$=new d.RawBlockNode(f[g-2],f[g-1],f[g],this._$);break;case 10:this.$=new d.MustacheNode(f[g-1],null,"","",this._$);break;case 11:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!1,this._$);break;case 12:this.$=d.prepareBlock(f[g-3],f[g-2],f[g-1],f[g],!0,this._$);break;case 13:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 14:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 15:this.$={strip:d.stripFlags(f[g-1],f[g-1]),program:f[g]};break;case 16:this.$={path:f[g-1],strip:d.stripFlags(f[g-2],f[g])};break;case 17:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 18:this.$=new d.MustacheNode(f[g-1],null,f[g-2],d.stripFlags(f[g-2],f[g]),this._$);break;case 19:this.$=new d.PartialNode(f[g-3],f[g-2],f[g-1],d.stripFlags(f[g-4],f[g]),this._$);break;case 20:this.$=new d.PartialNode(f[g-2],void 0,f[g-1],d.stripFlags(f[g-3],f[g]),this._$);break;case 21:this.$=new d.SexprNode([f[g-2]].concat(f[g-1]),f[g],this._$);break;case 22:this.$=new d.SexprNode([f[g]],null,this._$);break;case 23:this.$=f[g];break;case 24:this.$=new d.StringNode(f[g],this._$);break;case 25:this.$=new d.NumberNode(f[g],this._$);break;case 26:this.$=new d.BooleanNode(f[g],this._$);break;case 27:this.$=f[g];break;case 28:f[g-1].isHelper=!0,this.$=f[g-1];break;case 29:this.$=new d.HashNode(f[g],this._$);break;case 30:this.$=[f[g-2],f[g]];break;case 31:this.$=new d.PartialNameNode(f[g],this._$);break;case 32:this.$=new d.PartialNameNode(new d.StringNode(f[g],this._$),this._$);break;case 33:this.$=new d.PartialNameNode(new d.NumberNode(f[g],this._$));break;case 34:this.$=new d.DataNode(f[g],this._$);break;case 35:this.$=new d.IdNode(f[g],this._$);break;case 36:f[g-2].push({part:f[g],separator:f[g-1]}),this.$=f[g-2];break;case 37:this.$=[{part:f[g]}];break;case 38:this.$=[];break;case 39:f[g-1].push(f[g]);break;case 48:this.$=[];break;case 49:f[g-1].push(f[g]);break;case 52:this.$=[f[g]];break;case 53:f[g-1].push(f[g])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],43:[2,32],44:[2,32],45:[2,32],50:[2,32],52:[2,32]},{25:[2,33],42:[2,33],43:[2,33],44:[2,33],45:[2,33],50:[2,33],52:[2,33]},{25:[1,61]},{25:[1,62]},{18:[1,63]},{5:[2,17],12:[2,17],13:[2,17],16:[2,17],24:[2,17],26:[2,17],28:[2,17],29:[2,17],31:[2,17],32:[2,17],34:[2,17]},{18:[2,50],25:[2,50],30:51,33:[2,50],36:65,40:64,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],46:[2,50],47:66,48:58,49:60,50:[1,59],52:[1,25],53:24},{50:[1,67]},{18:[2,34],25:[2,34],33:[2,34],42:[2,34],43:[2,34],44:[2,34],45:[2,34],46:[2,34],50:[2,34],52:[2,34]},{5:[2,18],12:[2,18],13:[2,18],16:[2,18],24:[2,18],26:[2,18],28:[2,18],29:[2,18],31:[2,18],32:[2,18],34:[2,18]},{21:68,29:[1,69]},{29:[2,41]},{4:70,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{21:71,29:[1,69]},{29:[2,43]},{5:[2,9],12:[2,9],13:[2,9],16:[2,9],24:[2,9],26:[2,9],28:[2,9],29:[2,9],31:[2,9],32:[2,9],34:[2,9]},{25:[2,44],37:72,47:73,48:58,49:60,50:[1,74]},{25:[1,75]},{18:[2,23],25:[2,23],33:[2,23],42:[2,23],43:[2,23],44:[2,23],45:[2,23],46:[2,23],50:[2,23],52:[2,23]},{18:[2,24],25:[2,24],33:[2,24],42:[2,24],43:[2,24],44:[2,24],45:[2,24],46:[2,24],50:[2,24],52:[2,24]},{18:[2,25],25:[2,25],33:[2,25],42:[2,25],43:[2,25],44:[2,25],45:[2,25],46:[2,25],50:[2,25],52:[2,25]},{18:[2,26],25:[2,26],33:[2,26],42:[2,26],43:[2,26],44:[2,26],45:[2,26],46:[2,26],50:[2,26],52:[2,26]},{18:[2,27],25:[2,27],33:[2,27],42:[2,27],43:[2,27],44:[2,27],45:[2,27],46:[2,27],50:[2,27],52:[2,27]},{17:76,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[2,47]},{18:[2,29],25:[2,29],33:[2,29],46:[2,29],49:77,50:[1,74]},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],51:[1,78],52:[2,37],54:[2,37]},{18:[2,52],25:[2,52],33:[2,52],46:[2,52],50:[2,52]},{12:[2,13],13:[2,13],16:[2,13],24:[2,13],26:[2,13],28:[2,13],29:[2,13],31:[2,13],32:[2,13],34:[2,13]},{12:[2,14],13:[2,14],16:[2,14],24:[2,14],26:[2,14],28:[2,14],29:[2,14],31:[2,14],32:[2,14],34:[2,14]},{12:[2,10]},{18:[2,21],25:[2,21],33:[2,21],46:[2,21]},{18:[2,49],25:[2,49],33:[2,49],42:[2,49],43:[2,49],44:[2,49],45:[2,49],46:[2,49],50:[2,49],52:[2,49]},{18:[2,51],25:[2,51],33:[2,51],46:[2,51]},{18:[2,36],25:[2,36],33:[2,36],42:[2,36],43:[2,36],44:[2,36],45:[2,36],46:[2,36],50:[2,36],52:[2,36],54:[2,36]},{5:[2,11],12:[2,11],13:[2,11],16:[2,11],24:[2,11],26:[2,11],28:[2,11],29:[2,11],31:[2,11],32:[2,11],34:[2,11]},{30:79,50:[1,26],53:24},{29:[2,15]},{5:[2,12],12:[2,12],13:[2,12],16:[2,12],24:[2,12],26:[2,12],28:[2,12],29:[2,12],31:[2,12],32:[2,12],34:[2,12]},{25:[1,80]},{25:[2,45]},{51:[1,78]},{5:[2,20],12:[2,20],13:[2,20],16:[2,20],24:[2,20],26:[2,20],28:[2,20],29:[2,20],31:[2,20],32:[2,20],34:[2,20]},{46:[1,81]},{18:[2,53],25:[2,53],33:[2,53],46:[2,53],50:[2,53]},{30:51,36:82,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],50:[1,26],52:[1,25],53:24},{25:[1,83]},{5:[2,19],12:[2,19],13:[2,19],16:[2,19],24:[2,19],26:[2,19],28:[2,19],29:[2,19],31:[2,19],32:[2,19],34:[2,19]},{18:[2,28],25:[2,28],33:[2,28],42:[2,28],43:[2,28],44:[2,28],45:[2,28],46:[2,28],50:[2,28],52:[2,28]},{18:[2,30],25:[2,30],33:[2,30],46:[2,30],50:[2,30]},{5:[2,16],12:[2,16],13:[2,16],16:[2,16],24:[2,16],26:[2,16],28:[2,16],29:[2,16],31:[2,16],32:[2,16],34:[2,16]}],defaultActions:{4:[2,1],44:[2,41],47:[2,43],57:[2,47],63:[2,10],70:[2,15],73:[2,45]},parseError:function(a){throw new Error(a)},parse:function(a){function b(){var a;return a=c.lexer.lex()||1,"number"!=typeof a&&(a=c.symbols_[a]||a),a}var c=this,d=[0],e=[null],f=[],g=this.table,h="",i=0,j=0,k=0;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var l=this.lexer.yylloc;f.push(l);var m=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var n,o,p,q,r,s,t,u,v,w={};;){if(p=d[d.length-1],this.defaultActions[p]?q=this.defaultActions[p]:((null===n||"undefined"==typeof n)&&(n=b()),q=g[p]&&g[p][n]),"undefined"==typeof q||!q.length||!q[0]){var x="";if(!k){v=[];for(s in g[p])this.terminals_[s]&&s>2&&v.push("'"+this.terminals_[s]+"'");x=this.lexer.showPosition?"Parse error on line "+(i+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[n]||n)+"'":"Parse error on line "+(i+1)+": Unexpected "+(1==n?"end of input":"'"+(this.terminals_[n]||n)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[n]||n,line:this.lexer.yylineno,loc:l,expected:v})}}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+n);switch(q[0]){case 1:d.push(n),e.push(this.lexer.yytext),f.push(this.lexer.yylloc),d.push(q[1]),n=null,o?(n=o,o=null):(j=this.lexer.yyleng,h=this.lexer.yytext,i=this.lexer.yylineno,l=this.lexer.yylloc,k>0&&k--);break;case 2:if(t=this.productions_[q[1]][1],w.$=e[e.length-t],w._$={first_line:f[f.length-(t||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(t||1)].first_column,last_column:f[f.length-1].last_column},m&&(w._$.range=[f[f.length-(t||1)].range[0],f[f.length-1].range[1]]),r=this.performAction.call(w,h,j,i,this.yy,q[1],e,f),"undefined"!=typeof r)return r;t&&(d=d.slice(0,-1*t*2),e=e.slice(0,-1*t),f=f.slice(0,-1*t)),d.push(this.productions_[q[1]][0]),e.push(w.$),f.push(w._$),u=g[d[d.length-2]][d[d.length-1]],d.push(u);break;case 3:return!0}}return!0}},c=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var b=a.length,c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b-1),this.offset-=b;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-b]),this},more:function(){return this._more=!0,this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;g<f.length&&(c=this._input.match(this.rules[f[g]]),!c||b&&!(c[0].length>b[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/(?:\r\n?|\n).*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-e[e.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.matches=b,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}switch(c){case 0:if("\\\\"===b.yytext.slice(-2)?(e(0,1),this.begin("mu")):"\\"===b.yytext.slice(-1)?(e(0,1),this.begin("emu")):this.begin("mu"),b.yytext)return 12;break;case 1:return 12;case 2:return this.popState(),12;case 3:return b.yytext=b.yytext.substr(5,b.yyleng-9),this.popState(),15;case 4:return 12;case 5:return e(0,4),this.popState(),13;case 6:return 45;case 7:return 46;case 8:return 16;case 9:return this.popState(),this.begin("raw"),18;case 10:return 34;case 11:return 24;case 12:return 29;case 13:return this.popState(),28;case 14:return this.popState(),28;case 15:return 26;case 16:return 26;case 17:return 32;case 18:return 31;case 19:this.popState(),this.begin("com");break;case 20:return e(3,5),this.popState(),13;case 21:return 31;case 22:return 51;case 23:return 50;case 24:return 50;case 25:return 54;case 26:break;case 27:return this.popState(),33;case 28:return this.popState(),25;case 29:return b.yytext=e(1,2).replace(/\\"/g,'"'),42;case 30:return b.yytext=e(1,2).replace(/\\'/g,"'"),42;case 31:return 52;case 32:return 44;case 33:return 44;case 34:return 43;case 35:return 50;case 36:return b.yytext=e(1,2),50;case 37:return"INVALID";case 38:return 5}},a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^\s*(~)?\}\})/,/^(?:\{\{(~)?\s*else\s*(~)?\}\})/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],a.conditions={mu:{rules:[6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[5],inclusive:!1},raw:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,38],inclusive:!0}},a}();return b.lexer=c,a.prototype=b,b.Parser=a,new a}();return a=b}(),i=function(a){"use strict";function b(a,b){return{left:"~"===a.charAt(2),right:"~"===b.charAt(b.length-3)}}function c(a,b,c,d,i,k){if(a.sexpr.id.original!==d.path.original)throw new j(a.sexpr.id.original+" doesn't match "+d.path.original,a);var l=c&&c.program,m={left:a.strip.left,right:d.strip.right,openStandalone:f(b.statements),closeStandalone:e((l||b).statements)};if(a.strip.right&&g(b.statements,null,!0),l){var n=c.strip;n.left&&h(b.statements,null,!0),n.right&&g(l.statements,null,!0),d.strip.left&&h(l.statements,null,!0),e(b.statements)&&f(l.statements)&&(h(b.statements),g(l.statements))}else d.strip.left&&h(b.statements,null,!0);return i?new this.BlockNode(a,l,b,m,k):new this.BlockNode(a,b,l,m,k)}function d(a,b){for(var c=0,d=a.length;d>c;c++){var i=a[c],j=i.strip;if(j){var k=e(a,c,b,"partial"===i.type),l=f(a,c,b),m=j.openStandalone&&k,n=j.closeStandalone&&l,o=j.inlineStandalone&&k&&l;j.right&&g(a,c,!0),j.left&&h(a,c,!0),o&&(g(a,c),h(a,c)&&"partial"===i.type&&(i.indent=/([ \t]+$)/.exec(a[c-1].original)?RegExp.$1:"")),m&&(g((i.program||i.inverse).statements),h(a,c)),n&&(g(a,c),h((i.inverse||i.program).statements))}}return a}function e(a,b,c){void 0===b&&(b=a.length);var d=a[b-1],e=a[b-2];return d?"content"===d.type?(e||!c?/\r?\n\s*?$/:/(^|\r?\n)\s*?$/).test(d.original):void 0:c}function f(a,b,c){void 0===b&&(b=-1);var d=a[b+1],e=a[b+2];return d?"content"===d.type?(e||!c?/^\s*?\r?\n/:/^\s*?(\r?\n|$)/).test(d.original):void 0:c}function g(a,b,c){var d=a[null==b?0:b+1];if(d&&"content"===d.type&&(c||!d.rightStripped)){var e=d.string;d.string=d.string.replace(c?/^\s+/:/^[ \t]*\r?\n?/,""),d.rightStripped=d.string!==e}}function h(a,b,c){var d=a[null==b?a.length-1:b-1];if(d&&"content"===d.type&&(c||!d.leftStripped)){var e=d.string;return d.string=d.string.replace(c?/\s+$/:/[ \t]+$/,""),d.leftStripped=d.string!==e,d.leftStripped}}var i={},j=a;return i.stripFlags=b,i.prepareBlock=c,i.prepareProgram=d,i}(c),j=function(a,b,c,d){"use strict";function e(a){return a.constructor===h.ProgramNode?a:(g.yy=k,g.parse(a))}var f={},g=a,h=b,i=c,j=d.extend;f.parser=g;var k={};return j(k,i,h),f.parse=e,f}(h,g,i,b),k=function(a,b){"use strict";function c(){}function d(a,b,c){if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var d=c.parse(a),e=(new c.Compiler).compile(d,b);return(new c.JavaScriptCompiler).compile(e,b)}function e(a,b,c){function d(){var d=c.parse(a),e=(new c.Compiler).compile(d,b),f=(new c.JavaScriptCompiler).compile(e,b,void 0,!0);return c.template(f)}if(null==a||"string"!=typeof a&&a.constructor!==c.AST.ProgramNode)throw new h("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a);b=b||{},"data"in b||(b.data=!0),b.compat&&(b.useDepths=!0);var e,f=function(a,b){return e||(e=d()),e.call(this,a,b)};return f._setup=function(a){return e||(e=d()),e._setup(a)},f._child=function(a,b,c){return e||(e=d()),e._child(a,b,c)},f}function f(a,b){if(a===b)return!0;if(i(a)&&i(b)&&a.length===b.length){for(var c=0;c<a.length;c++)if(!f(a[c],b[c]))return!1;return!0}}var g={},h=a,i=b.isArray,j=[].slice;return g.Compiler=c,c.prototype={compiler:c,equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b)return!1;for(var c=0;b>c;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||!f(d.args,e.args))return!1}for(b=this.children.length,c=0;b>c;c++)if(!this.children[c].equals(a.children[c]))return!1;return!0},guid:0,compile:function(a,b){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=b,this.stringParams=b.stringParams,this.trackIds=b.trackIds;var c=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0,lookup:!0},c)for(var d in c)this.options.knownHelpers[d]=c[d];return this.accept(a)},accept:function(a){return this[a.type](a)},program:function(a){for(var b=a.statements,c=0,d=b.length;d>c;c++)this.accept(b[c]);return this.isSimple=1===d,this.depths.list=this.depths.list.sort(function(a,b){return a-b}),this},compileProgram:function(a){var b,c=(new this.compiler).compile(a,this.options),d=this.guid++;\r
+this.usePartial=this.usePartial||c.usePartial,this.children[d]=c;for(var e=0,f=c.depths.list.length;f>e;e++)b=c.depths.list[e],2>b||this.addDepth(b-1);return d},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;c&&(c=this.compileProgram(c)),d&&(d=this.compileProgram(d));var e=b.sexpr,f=this.classifySexpr(e);"helper"===f?this.helperSexpr(e,c,d):"simple"===f?(this.simpleSexpr(e),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("blockValue",e.id.original)):(this.ambiguousSexpr(e,c,d),this.opcode("pushProgram",c),this.opcode("pushProgram",d),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(a){var b,c,d=a.pairs;for(this.opcode("pushHash"),b=0,c=d.length;c>b;b++)this.pushParam(d[b][1]);for(;b--;)this.opcode("assignToHash",d[b][0]);this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=!0,a.hash?this.accept(a.hash):this.opcode("push","undefined"),a.context?this.accept(a.context):(this.opcode("getContext",0),this.opcode("pushContext")),this.opcode("invokePartial",b.name,a.indent||""),this.opcode("append")},content:function(a){a.string&&this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr),a.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=null!=b||null!=c;this.opcode("getContext",d.depth),this.opcode("pushProgram",b),this.opcode("pushProgram",c),this.ID(d),this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;"DATA"===b.type?this.DATA(b):b.parts.length?this.ID(b):(this.addDepth(b.depth),this.opcode("getContext",b.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,c){var d=this.setupFullMustacheParams(a,b,c),e=a.id,f=e.parts[0];if(this.options.knownHelpers[f])this.opcode("invokeKnownHelper",d.length,f);else{if(this.options.knownHelpersOnly)throw new h("You specified knownHelpersOnly, but used the unknown helper "+f,a);e.falsy=!0,this.ID(e),this.opcode("invokeHelper",d.length,e.original,e.isSimple)}},sexpr:function(a){var b=this.classifySexpr(a);"simple"===b?this.simpleSexpr(a):"helper"===b?this.helperSexpr(a):this.ambiguousSexpr(a)},ID:function(a){this.addDepth(a.depth),this.opcode("getContext",a.depth);var b=a.parts[0];b?this.opcode("lookupOnContext",a.parts,a.falsy,a.isScoped):this.opcode("pushContext")},DATA:function(a){this.options.data=!0,this.opcode("lookupData",a.id.depth,a.id.parts)},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:j.call(arguments,1)})},addDepth:function(a){0!==a&&(this.depths[a]||(this.depths[a]=!0,this.depths.list.push(a)))},classifySexpr:function(a){var b=a.isHelper,c=a.eligibleHelper,d=this.options;if(c&&!b){var e=a.id.parts[0];d.knownHelpers[e]?b=!0:d.knownHelpersOnly&&(c=!1)}return b?"helper":c?"ambiguous":"simple"},pushParams:function(a){for(var b=0,c=a.length;c>b;b++)this.pushParam(a[b])},pushParam:function(a){this.stringParams?(a.depth&&this.addDepth(a.depth),this.opcode("getContext",a.depth||0),this.opcode("pushStringParam",a.stringModeValue,a.type),"sexpr"===a.type&&this.sexpr(a)):(this.trackIds&&this.opcode("pushId",a.type,a.idName||a.stringModeValue),this.accept(a))},setupFullMustacheParams:function(a,b,c){var d=a.params;return this.pushParams(d),this.opcode("pushProgram",b),this.opcode("pushProgram",c),a.hash?this.hash(a.hash):this.opcode("emptyHash"),d}},g.precompile=d,g.compile=e,g}(c,b),l=function(a,b){"use strict";function c(a){this.value=a}function d(){}var e,f=a.COMPILER_REVISION,g=a.REVISION_CHANGES,h=b;d.prototype={nameLookup:function(a,b){return d.isValidJavaScriptVariableName(b)?a+"."+b:a+"['"+b+"']"},depthedLookup:function(a){return this.aliases.lookup="this.lookup",'lookup(depths, "'+a+'")'},compilerInfo:function(){var a=f,b=g[a];return[a,b]},appendToBuffer:function(a){return this.environment.isSimple?"return "+a+";":{appendToBuffer:!0,content:a,toString:function(){return"buffer += "+a+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a,this.options=b,this.stringParams=this.options.stringParams,this.trackIds=this.options.trackIds,this.precompile=!d,this.name=this.environment.name,this.isChild=!!c,this.context=c||{programs:[],environments:[]},this.preamble(),this.stackSlot=0,this.stackVars=[],this.aliases={},this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],this.compileChildren(a,b),this.useDepths=this.useDepths||a.depths.list.length||this.options.compat;var e,f,g,i=a.opcodes;for(f=0,g=i.length;g>f;f++)e=i[f],this[e.opcode].apply(this,e.args);if(this.pushSource(""),this.stackSlot||this.inlineStack.length||this.compileStack.length)throw new h("Compile completed with content left on stack");var j=this.createFunctionContext(d);if(this.isChild)return j;var k={compiler:this.compilerInfo(),main:j},l=this.context.programs;for(f=0,g=l.length;g>f;f++)l[f]&&(k[f]=l[f]);return this.environment.usePartial&&(k.usePartial=!0),this.options.data&&(k.useData=!0),this.useDepths&&(k.useDepths=!0),this.options.compat&&(k.compat=!0),d||(k.compiler=JSON.stringify(k.compiler),k=this.objectLiteral(k)),k},preamble:function(){this.lastContext=0,this.source=[]},createFunctionContext:function(a){var b="",c=this.stackVars.concat(this.registers.list);c.length>0&&(b+=", "+c.join(", "));for(var d in this.aliases)this.aliases.hasOwnProperty(d)&&(b+=", "+d+"="+this.aliases[d]);var e=["depth0","helpers","partials","data"];this.useDepths&&e.push("depths");var f=this.mergeSource(b);return a?(e.push(f),Function.apply(this,e)):"function("+e.join(",")+") {\n  "+f+"}"},mergeSource:function(a){for(var b,c,d="",e=!this.forceBuffer,f=0,g=this.source.length;g>f;f++){var h=this.source[f];h.appendToBuffer?b=b?b+"\n    + "+h.content:h.content:(b&&(d?d+="buffer += "+b+";\n  ":(c=!0,d=b+";\n  "),b=void 0),d+=h+"\n  ",this.environment.isSimple||(e=!1))}return e?(b||!d)&&(d+="return "+(b||'""')+";\n"):(a+=", buffer = "+(c?"":this.initializeBuffer()),d+=b?"return buffer + "+b+";\n":"return buffer;\n"),a&&(d="var "+a.substring(2)+(c?"":";\n  ")+d),d},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=[this.contextName(0)];this.setupParams(a,0,b);var c=this.popStack();b.splice(1,0,c),this.push("blockHelperMissing.call("+b.join(", ")+")")},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=[this.contextName(0)];this.setupParams("",0,a,!0),this.flushInline();var b=this.topStack();a.splice(1,0,b),this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){this.pendingContent&&(a=this.pendingContent+a),this.pendingContent=a},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if ("+a+" != null) { "+this.appendToBuffer(a)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){this.lastContext=a},pushContext:function(){this.pushStackLiteral(this.contextName(this.lastContext))},lookupOnContext:function(a,b,c){var d=0,e=a.length;for(c||!this.options.compat||this.lastContext?this.pushContext():this.push(this.depthedLookup(a[d++]));e>d;d++)this.replaceStack(function(c){var e=this.nameLookup(c,a[d],"context");return b?" && "+e:" != null ? "+e+" : "+c})},lookupData:function(a,b){a?this.pushStackLiteral("this.data(data, "+a+")"):this.pushStackLiteral("data");for(var c=b.length,d=0;c>d;d++)this.replaceStack(function(a){return" && "+this.nameLookup(a,b[d],"data")})},resolvePossibleLambda:function(){this.aliases.lambda="this.lambda",this.push("lambda("+this.popStack()+", "+this.contextName(0)+")")},pushStringParam:function(a,b){this.pushContext(),this.pushString(b),"sexpr"!==b&&("string"==typeof a?this.pushString(a):this.pushStackLiteral(a))},emptyHash:function(){this.pushStackLiteral("{}"),this.trackIds&&this.push("{}"),this.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop(),this.trackIds&&this.push("{"+a.ids.join(",")+"}"),this.stringParams&&(this.push("{"+a.contexts.join(",")+"}"),this.push("{"+a.types.join(",")+"}")),this.push("{\n    "+a.values.join(",\n    ")+"\n  }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){return this.inlineStack.push(a),a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){null!=a?this.pushStackLiteral(this.programExpression(a)):this.pushStackLiteral(null)},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";var d=this.popStack(),e=this.setupHelper(a,b),f=(c?e.name+" || ":"")+d+" || helperMissing";this.push("(("+f+").call("+e.callParams+"))")},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"',this.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var c=this.popStack();this.emptyHash();var d=this.setupHelper(0,a,b),e=this.lastHelper=this.nameLookup("helpers",a,"helper");this.push("((helper = (helper = "+e+" || "+c+") != null ? helper : helperMissing"+(d.paramsInit?"),("+d.paramsInit:"")+"),(typeof helper === functionType ? helper.call("+d.callParams+") : helper))")},invokePartial:function(a,b){var c=[this.nameLookup("partials",a,"partial"),"'"+b+"'","'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];this.options.data?c.push("data"):this.options.compat&&c.push("undefined"),this.options.compat&&c.push("depths"),this.push("this.invokePartial("+c.join(", ")+")")},assignToHash:function(a){var b,c,d,e=this.popStack();this.trackIds&&(d=this.popStack()),this.stringParams&&(c=this.popStack(),b=this.popStack());var f=this.hash;b&&f.contexts.push("'"+a+"': "+b),c&&f.types.push("'"+a+"': "+c),d&&f.ids.push("'"+a+"': "+d),f.values.push("'"+a+"': ("+e+")")},pushId:function(a,b){"ID"===a||"DATA"===a?this.pushString(b):"sexpr"===a?this.pushStackLiteral("true"):this.pushStackLiteral("null")},compiler:d,compileChildren:function(a,b){for(var c,d,e=a.children,f=0,g=e.length;g>f;f++){c=e[f],d=new this.compiler;var h=this.matchExistingProgram(c);null==h?(this.context.programs.push(""),h=this.context.programs.length,c.index=h,c.name="program"+h,this.context.programs[h]=d.compile(c,b,this.context,!this.precompile),this.context.environments[h]=c,this.useDepths=this.useDepths||d.useDepths):(c.index=h,c.name="program"+h)}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;c>b;b++){var d=this.context.environments[b];if(d&&d.equals(a))return b}},programExpression:function(a){var b=this.environment.children[a],c=(b.depths.list,this.useDepths),d=[b.index,"data"];return c&&d.push("depths"),"this.program("+d.join(", ")+")"},useRegister:function(a){this.registers[a]||(this.registers[a]=!0,this.registers.list.push(a))},pushStackLiteral:function(a){return this.push(new c(a))},pushSource:function(a){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),a&&this.source.push(a)},pushStack:function(a){this.flushInline();var b=this.incrStack();return this.pushSource(b+" = "+a+";"),this.compileStack.push(b),b},replaceStack:function(a){{var b,d,e,f="";this.isInline()}if(!this.isInline())throw new h("replaceStack on non-inline");var g=this.popStack(!0);if(g instanceof c)f=b=g.value,e=!0;else{d=!this.stackSlot;var i=d?this.incrStack():this.topStackName();f="("+this.push(i)+" = "+g+")",b=this.topStack()}var j=a.call(this,b);e||this.popStack(),d&&this.stackSlot--,this.push("("+f+j+")")},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,d=a.length;d>b;b++){var e=a[b];e instanceof c?this.compileStack.push(e):this.pushStack(e)}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),d=(b?this.inlineStack:this.compileStack).pop();if(!a&&d instanceof c)return d.value;if(!b){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return d},topStack:function(){var a=this.isInline()?this.inlineStack:this.compileStack,b=a[a.length-1];return b instanceof c?b.value:b},contextName:function(a){return this.useDepths&&a?"depths["+a+"]":"depth"+a},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a)a.hasOwnProperty(c)&&b.push(this.quotedString(c)+":"+a[c]);return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c),f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:[this.contextName(0)].concat(d).join(", ")}},setupOptions:function(a,b,c){var d,e,f,g={},h=[],i=[],j=[];g.name=this.quotedString(a),g.hash=this.popStack(),this.trackIds&&(g.hashIds=this.popStack()),this.stringParams&&(g.hashTypes=this.popStack(),g.hashContexts=this.popStack()),e=this.popStack(),f=this.popStack(),(f||e)&&(f||(f="this.noop"),e||(e="this.noop"),g.fn=f,g.inverse=e);for(var k=b;k--;)d=this.popStack(),c[k]=d,this.trackIds&&(j[k]=this.popStack()),this.stringParams&&(i[k]=this.popStack(),h[k]=this.popStack());return this.trackIds&&(g.ids="["+j.join(",")+"]"),this.stringParams&&(g.types="["+i.join(",")+"]",g.contexts="["+h.join(",")+"]"),this.options.data&&(g.data="data"),g},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));return d?(this.useRegister("options"),c.push("options"),"options="+e):(c.push(e),"")}};for(var i="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),j=d.RESERVED_WORDS={},k=0,l=i.length;l>k;k++)j[i[k]]=!0;return d.isValidJavaScriptVariableName=function(a){return!d.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)},e=d}(d,c),m=function(a,b,c,d,e){"use strict";var f,g=a,h=b,i=c.parser,j=c.parse,k=d.Compiler,l=d.compile,m=d.precompile,n=e,o=g.create,p=function(){var a=o();return a.compile=function(b,c){return l(b,c,a)},a.precompile=function(b,c){return m(b,c,a)},a.AST=h,a.Compiler=k,a.JavaScriptCompiler=n,a.Parser=i,a.parse=j,a};return g=p(),g.create=p,g["default"]=g,f=g}(f,g,j,k,l);return m});
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack.js
new file mode 100644 (file)
index 0000000..8d9a7e0
--- /dev/null
@@ -0,0 +1,2 @@
+/*! highlight.js v9.1.0 | BSD3 License | git.io/hljslicense */\r
+!function(e){"undefined"!=typeof exports?e(exports):(self.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return self.hljs}))}(function(e){function n(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0==t.index}function a(e){return/^(no-?highlight|plain|text)$/i.test(e)}function i(e){var n,t,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",t=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return E(t[1])?t[1]:"no-highlight";for(i=i.split(/\s+/),n=0,r=i.length;r>n;n++)if(E(i[n])||a(i[n]))return i[n]}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3==i.nodeType?a+=i.nodeValue.length:1==i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!=r[0].offset?e[0].offset<r[0].offset?e:r:"start"==r[0].event?e:r:e.length?e:r}function o(e){function r(e){return" "+e.nodeName+'="'+n(e.value)+'"'}l+="<"+t(e)+Array.prototype.map.call(e.attributes,r).join("")+">"}function u(e){l+="</"+t(e)+">"}function c(e){("start"==e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g==e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g==e&&g.length&&g[0].offset==s);f.reverse().forEach(o)}else"start"==g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):Object.keys(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\b\w+\b/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),void 0===a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"==e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){for(var t=0;t<n.c.length;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":x.classPrefix,i='<span class="'+a,o=t?"":"</span>";return i+=e+'">',i+n+o}function p(){if(!L.k)return n(M);var e="",t=0;L.lR.lastIndex=0;for(var r=L.lR.exec(M);r;){e+=n(M.substr(t,r.index-t));var a=g(L,r);a?(B+=a[1],e+=h(a[0],n(r[0]))):e+=n(r[0]),t=L.lR.lastIndex,r=L.lR.exec(M)}return e+n(M.substr(t))}function d(){var e="string"==typeof L.sL;if(e&&!R[L.sL])return n(M);var t=e?l(L.sL,M,!0,y[L.sL]):f(M,L.sL.length?L.sL:void 0);return L.r>0&&(B+=t.r),e&&(y[L.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){return void 0!==L.sL?d():p()}function v(e,t){var r=e.cN?h(e.cN,"",!0):"";e.rB?(k+=r,M=""):e.eB?(k+=n(t)+r,M=""):(k+=r,M=t),L=Object.create(e,{parent:{value:L}})}function m(e,t){if(M+=e,void 0===t)return k+=b(),0;var r=o(t,L);if(r)return k+=b(),v(r,t),r.rB?0:t.length;var a=u(L,t);if(a){var i=L;i.rE||i.eE||(M+=t),k+=b();do L.cN&&(k+="</span>"),B+=L.r,L=L.parent;while(L!=a.parent);return i.eE&&(k+=n(t)),M="",a.starts&&v(a.starts,""),i.rE?0:t.length}if(c(t,L))throw new Error('Illegal lexeme "'+t+'" for mode "'+(L.cN||"<unnamed>")+'"');return M+=t,t.length||1}var N=E(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,L=i||N,y={},k="";for(w=L;w!=N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var M="",B=0;try{for(var C,j,I=0;;){if(L.t.lastIndex=I,C=L.t.exec(t),!C)break;j=m(t.substr(I,C.index-I),C[0]),I=C.index+j}for(m(t.substr(I)),w=L;w.parent;w=w.parent)w.cN&&(k+="</span>");return{r:B,value:k,language:e,top:L}}catch(O){if(-1!=O.message.indexOf("Illegal"))return{r:0,value:n(t)};throw O}}function f(e,t){t=t||x.languages||Object.keys(R);var r={r:0,value:n(e)},a=r;return t.forEach(function(n){if(E(n)){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}}),a.language&&(r.second_best=a),r}function g(e){return x.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,n){return n.replace(/\t/g,x.tabReplace)})),x.useBR&&(e=e.replace(/\n/g,"<br>")),e}function h(e,n,t){var r=n?w[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n=i(e);if(!a(n)){var t;x.useBR?(t=document.createElementNS("http://www.w3.org/1999/xhtml","div"),t.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n")):t=e;var r=t.textContent,o=n?l(n,r,!0):f(r),s=u(t);if(s.length){var p=document.createElementNS("http://www.w3.org/1999/xhtml","div");p.innerHTML=o.value,o.value=c(s,u(p),r)}o.value=g(o.value),e.innerHTML=o.value,e.className=h(e.className,n,o.language),e.result={language:o.language,re:o.r},o.second_best&&(e.second_best={language:o.second_best.language,re:o.second_best.r})}}function d(e){x=o(x,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=R[n]=t(e);r.aliases&&r.aliases.forEach(function(e){w[e]=n})}function N(){return Object.keys(R)}function E(e){return e=(e||"").toLowerCase(),R[e]||R[w[e]]}var x={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},R={},w={};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=E,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e});hljs.registerLanguage("json",function(e){var t={literal:"true false null"},i=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:i,k:t},s={b:"{",e:"}",c:[{cN:"attr",b:'\\s*"',e:'"\\s*:\\s*',eB:!0,eE:!0,c:[e.BE],i:"\\n",starts:r}],i:"\\S"},n={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return i.splice(i.length,0,s,n),{c:i,k:t,i:"\\S"}});hljs.registerLanguage("xml",function(s){var t="[A-Za-z0-9\\._:-]+",e={b:/<\?(php)?(?!\w)/,e:/\?>/,sL:"php"},r={eW:!0,i:/</,r:0,c:[e,{cN:"attr",b:t,r:0},{b:"=",r:0,c:[{cN:"string",c:[e],v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],cI:!0,c:[{cN:"meta",b:"<!DOCTYPE",e:">",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("<!--","-->",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"tag",b:"<style(?=\\s|>|$)",e:">",k:{name:"style"},c:[r],starts:{e:"</style>",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"<script(?=\\s|>|$)",e:">",k:{name:"script"},c:[r],starts:{e:"</script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},e,{cN:"meta",b:/<\?\w+/,e:/\?>/,r:10},{cN:"tag",b:"</?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},r]}]}});hljs.registerLanguage("javascript",function(e){return{aliases:["js"],k:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{b:/</,e:/>\s*[);\]]/,r:0,sL:"xml"}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[e.CLCM,e.CBCM]}],i:/\[|%/},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\s*\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",c:[{cN:"keyword",b:/\S+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js
new file mode 100644 (file)
index 0000000..66718f6
--- /dev/null
@@ -0,0 +1,34 @@
+'use strict';\r
+\r
+(function () {\r
+    var configure, highlightBlock;\r
+\r
+    configure = hljs.configure;\r
+    // "extending" hljs.configure method\r
+    hljs.configure = function _configure (options) {\r
+        var size = options.highlightSizeThreshold;\r
+\r
+        // added highlightSizeThreshold option to set maximum size\r
+        // of processed string. Set to null if not a number\r
+        hljs.highlightSizeThreshold = size === +size ? size : null;\r
+\r
+        configure.call(this, options);\r
+    };\r
+\r
+    highlightBlock = hljs.highlightBlock;\r
+\r
+    // "extending" hljs.highlightBlock method\r
+    hljs.highlightBlock = function _highlightBlock (el) {\r
+        var innerHTML = el.innerHTML;\r
+        var size = hljs.highlightSizeThreshold;\r
+\r
+        // check if highlightSizeThreshold is not set or element innerHTML\r
+        // is less than set option highlightSizeThreshold\r
+        if (size == null || size > innerHTML.length) {\r
+            // proceed with hljs.highlightBlock\r
+            highlightBlock.call(hljs, el);\r
+        }\r
+    };\r
+\r
+})();\r
+\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery-1.8.0.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery-1.8.0.min.js
new file mode 100644 (file)
index 0000000..f121291
--- /dev/null
@@ -0,0 +1,2 @@
+/*! jQuery v@1.8.0 jquery.com | jquery.org/license */\r
+(function(a,b){function G(a){var b=F[a]={};return p.each(a.split(s),function(a,c){b[c]=!0}),b}function J(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(I,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:+d+""===d?+d:H.test(d)?p.parseJSON(d):d}catch(f){}p.data(a,c,d)}else d=b}return d}function K(a){var b;for(b in a){if(b==="data"&&p.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function ba(){return!1}function bb(){return!0}function bh(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function bi(a,b){do a=a[b];while(a&&a.nodeType!==1);return a}function bj(a,b,c){b=b||0;if(p.isFunction(b))return p.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return p.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=p.grep(a,function(a){return a.nodeType===1});if(be.test(b))return p.filter(b,d,!c);b=p.filter(b,d)}return p.grep(a,function(a,d){return p.inArray(a,b)>=0===c})}function bk(a){var b=bl.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function bC(a,b){return a.getElementsByTagName(b)[0]||a.appendChild(a.ownerDocument.createElement(b))}function bD(a,b){if(b.nodeType!==1||!p.hasData(a))return;var c,d,e,f=p._data(a),g=p._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;d<e;d++)p.event.add(b,c,h[c][d])}g.data&&(g.data=p.extend({},g.data))}function bE(a,b){var c;if(b.nodeType!==1)return;b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?(b.parentNode&&(b.outerHTML=a.outerHTML),p.support.html5Clone&&a.innerHTML&&!p.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):c==="input"&&bv.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):c==="option"?b.selected=a.defaultSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text),b.removeAttribute(p.expando)}function bF(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bG(a){bv.test(a.type)&&(a.defaultChecked=a.checked)}function bX(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=bV.length;while(e--){b=bV[e]+c;if(b in a)return b}return d}function bY(a,b){return a=b||a,p.css(a,"display")==="none"||!p.contains(a.ownerDocument,a)}function bZ(a,b){var c,d,e=[],f=0,g=a.length;for(;f<g;f++){c=a[f];if(!c.style)continue;e[f]=p._data(c,"olddisplay"),b?(!e[f]&&c.style.display==="none"&&(c.style.display=""),c.style.display===""&&bY(c)&&(e[f]=p._data(c,"olddisplay",cb(c.nodeName)))):(d=bH(c,"display"),!e[f]&&d!=="none"&&p._data(c,"olddisplay",d))}for(f=0;f<g;f++){c=a[f];if(!c.style)continue;if(!b||c.style.display==="none"||c.style.display==="")c.style.display=b?e[f]||"":"none"}return a}function b$(a,b,c){var d=bO.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function b_(a,b,c,d){var e=c===(d?"border":"content")?4:b==="width"?1:0,f=0;for(;e<4;e+=2)c==="margin"&&(f+=p.css(a,c+bU[e],!0)),d?(c==="content"&&(f-=parseFloat(bH(a,"padding"+bU[e]))||0),c!=="margin"&&(f-=parseFloat(bH(a,"border"+bU[e]+"Width"))||0)):(f+=parseFloat(bH(a,"padding"+bU[e]))||0,c!=="padding"&&(f+=parseFloat(bH(a,"border"+bU[e]+"Width"))||0));return f}function ca(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=!0,f=p.support.boxSizing&&p.css(a,"boxSizing")==="border-box";if(d<=0){d=bH(a,b);if(d<0||d==null)d=a.style[b];if(bP.test(d))return d;e=f&&(p.support.boxSizingReliable||d===a.style[b]),d=parseFloat(d)||0}return d+b_(a,b,c||(f?"border":"content"),e)+"px"}function cb(a){if(bR[a])return bR[a];var b=p("<"+a+">").appendTo(e.body),c=b.css("display");b.remove();if(c==="none"||c===""){bI=e.body.appendChild(bI||p.extend(e.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!bJ||!bI.createElement)bJ=(bI.contentWindow||bI.contentDocument).document,bJ.write("<!doctype html><html><body>"),bJ.close();b=bJ.body.appendChild(bJ.createElement(a)),c=bH(b,"display"),e.body.removeChild(bI)}return bR[a]=c,c}function ch(a,b,c,d){var e;if(p.isArray(b))p.each(b,function(b,e){c||cd.test(a)?d(a,e):ch(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&p.type(b)==="object")for(e in b)ch(a+"["+e+"]",b[e],c,d);else d(a,b)}function cy(a){return function(b,c){typeof b!="string"&&(c=b,b="*");var d,e,f,g=b.toLowerCase().split(s),h=0,i=g.length;if(p.isFunction(c))for(;h<i;h++)d=g[h],f=/^\+/.test(d),f&&(d=d.substr(1)||"*"),e=a[d]=a[d]||[],e[f?"unshift":"push"](c)}}function cz(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h,i=a[f],j=0,k=i?i.length:0,l=a===cu;for(;j<k&&(l||!h);j++)h=i[j](c,d,e),typeof h=="string"&&(!l||g[h]?h=b:(c.dataTypes.unshift(h),h=cz(a,c,d,e,h,g)));return(l||!h)&&!g["*"]&&(h=cz(a,c,d,e,"*",g)),h}function cA(a,c){var d,e,f=p.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((f[d]?a:e||(e={}))[d]=c[d]);e&&p.extend(!0,a,e)}function cB(a,c,d){var e,f,g,h,i=a.contents,j=a.dataTypes,k=a.responseFields;for(f in k)f in d&&(c[k[f]]=d[f]);while(j[0]==="*")j.shift(),e===b&&(e=a.mimeType||c.getResponseHeader("content-type"));if(e)for(f in i)if(i[f]&&i[f].test(e)){j.unshift(f);break}if(j[0]in d)g=j[0];else{for(f in d){if(!j[0]||a.converters[f+" "+j[0]]){g=f;break}h||(h=f)}g=g||h}if(g)return g!==j[0]&&j.unshift(g),d[g]}function cC(a,b){var c,d,e,f,g=a.dataTypes.slice(),h=g[0],i={},j=0;a.dataFilter&&(b=a.dataFilter(b,a.dataType));if(g[1])for(c in a.converters)i[c.toLowerCase()]=a.converters[c];for(;e=g[++j];)if(e!=="*"){if(h!=="*"&&h!==e){c=i[h+" "+e]||i["* "+e];if(!c)for(d in i){f=d.split(" ");if(f[1]===e){c=i[h+" "+f[0]]||i["* "+f[0]];if(c){c===!0?c=i[d]:i[d]!==!0&&(e=f[0],g.splice(j--,0,e));break}}}if(c!==!0)if(c&&a["throws"])b=c(b);else try{b=c(b)}catch(k){return{state:"parsererror",error:c?k:"No conversion from "+h+" to "+e}}}h=e}return{state:"success",data:b}}function cK(){try{return new a.XMLHttpRequest}catch(b){}}function cL(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function cT(){return setTimeout(function(){cM=b},0),cM=p.now()}function cU(a,b){p.each(b,function(b,c){var d=(cS[b]||[]).concat(cS["*"]),e=0,f=d.length;for(;e<f;e++)if(d[e].call(a,b,c))return})}function cV(a,b,c){var d,e=0,f=0,g=cR.length,h=p.Deferred().always(function(){delete i.elem}),i=function(){var b=cM||cT(),c=Math.max(0,j.startTime+j.duration-b),d=1-(c/j.duration||0),e=0,f=j.tweens.length;for(;e<f;e++)j.tweens[e].run(d);return h.notifyWith(a,[j,d,c]),d<1&&f?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:p.extend({},b),opts:p.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:cM||cT(),duration:c.duration,tweens:[],createTween:function(b,c,d){var e=p.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(e),e},stop:function(b){var c=0,d=b?j.tweens.length:0;for(;c<d;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;cW(k,j.opts.specialEasing);for(;e<g;e++){d=cR[e].call(j,a,k,j.opts);if(d)return d}return cU(j,k),p.isFunction(j.opts.start)&&j.opts.start.call(a,j),p.fx.timer(p.extend(i,{anim:j,queue:j.opts.queue,elem:a})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}function cW(a,b){var c,d,e,f,g;for(c in a){d=p.camelCase(c),e=b[d],f=a[c],p.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=p.cssHooks[d];if(g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}}function cX(a,b,c){var d,e,f,g,h,i,j,k,l=this,m=a.style,n={},o=[],q=a.nodeType&&bY(a);c.queue||(j=p._queueHooks(a,"fx"),j.unqueued==null&&(j.unqueued=0,k=j.empty.fire,j.empty.fire=function(){j.unqueued||k()}),j.unqueued++,l.always(function(){l.always(function(){j.unqueued--,p.queue(a,"fx").length||j.empty.fire()})})),a.nodeType===1&&("height"in b||"width"in b)&&(c.overflow=[m.overflow,m.overflowX,m.overflowY],p.css(a,"display")==="inline"&&p.css(a,"float")==="none"&&(!p.support.inlineBlockNeedsLayout||cb(a.nodeName)==="inline"?m.display="inline-block":m.zoom=1)),c.overflow&&(m.overflow="hidden",p.support.shrinkWrapBlocks||l.done(function(){m.overflow=c.overflow[0],m.overflowX=c.overflow[1],m.overflowY=c.overflow[2]}));for(d in b){f=b[d];if(cO.exec(f)){delete b[d];if(f===(q?"hide":"show"))continue;o.push(d)}}g=o.length;if(g){h=p._data(a,"fxshow")||p._data(a,"fxshow",{}),q?p(a).show():l.done(function(){p(a).hide()}),l.done(function(){var b;p.removeData(a,"fxshow",!0);for(b in n)p.style(a,b,n[b])});for(d=0;d<g;d++)e=o[d],i=l.createTween(e,q?h[e]:0),n[e]=h[e]||p.style(a,e),e in h||(h[e]=i.start,q&&(i.end=i.start,i.start=e==="width"||e==="height"?1:0))}}function cY(a,b,c,d,e){return new cY.prototype.init(a,b,c,d,e)}function cZ(a,b){var c,d={height:a},e=0;for(;e<4;e+=2-b)c=bU[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function c_(a){return p.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}var c,d,e=a.document,f=a.location,g=a.navigator,h=a.jQuery,i=a.$,j=Array.prototype.push,k=Array.prototype.slice,l=Array.prototype.indexOf,m=Object.prototype.toString,n=Object.prototype.hasOwnProperty,o=String.prototype.trim,p=function(a,b){return new p.fn.init(a,b,c)},q=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,r=/\S/,s=/\s+/,t=r.test(" ")?/^[\s\xA0]+|[\s\xA0]+$/g:/^\s+|\s+$/g,u=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,y=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,z=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,A=/^-ms-/,B=/-([\da-z])/gi,C=function(a,b){return(b+"").toUpperCase()},D=function(){e.addEventListener?(e.removeEventListener("DOMContentLoaded",D,!1),p.ready()):e.readyState==="complete"&&(e.detachEvent("onreadystatechange",D),p.ready())},E={};p.fn=p.prototype={constructor:p,init:function(a,c,d){var f,g,h,i;if(!a)return this;if(a.nodeType)return this.context=this[0]=a,this.length=1,this;if(typeof a=="string"){a.charAt(0)==="<"&&a.charAt(a.length-1)===">"&&a.length>=3?f=[null,a,null]:f=u.exec(a);if(f&&(f[1]||!c)){if(f[1])return c=c instanceof p?c[0]:c,i=c&&c.nodeType?c.ownerDocument||c:e,a=p.parseHTML(f[1],i,!0),v.test(f[1])&&p.isPlainObject(c)&&this.attr.call(a,c,!0),p.merge(this,a);g=e.getElementById(f[2]);if(g&&g.parentNode){if(g.id!==f[2])return d.find(a);this.length=1,this[0]=g}return this.context=e,this.selector=a,this}return!c||c.jquery?(c||d).find(a):this.constructor(c).find(a)}return p.isFunction(a)?d.ready(a):(a.selector!==b&&(this.selector=a.selector,this.context=a.context),p.makeArray(a,this))},selector:"",jquery:"1.8.0",length:0,size:function(){return this.length},toArray:function(){return k.call(this)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=p.merge(this.constructor(),a);return d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")"),d},each:function(a,b){return p.each(this,a,b)},ready:function(a){return p.ready.promise().done(a),this},eq:function(a){return a=+a,a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(k.apply(this,arguments),"slice",k.call(arguments).join(","))},map:function(a){return this.pushStack(p.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:j,sort:[].sort,splice:[].splice},p.fn.init.prototype=p.fn,p.extend=p.fn.extend=function(){var a,c,d,e,f,g,h=arguments[0]||{},i=1,j=arguments.length,k=!1;typeof h=="boolean"&&(k=h,h=arguments[1]||{},i=2),typeof h!="object"&&!p.isFunction(h)&&(h={}),j===i&&(h=this,--i);for(;i<j;i++)if((a=arguments[i])!=null)for(c in a){d=h[c],e=a[c];if(h===e)continue;k&&e&&(p.isPlainObject(e)||(f=p.isArray(e)))?(f?(f=!1,g=d&&p.isArray(d)?d:[]):g=d&&p.isPlainObject(d)?d:{},h[c]=p.extend(k,g,e)):e!==b&&(h[c]=e)}return h},p.extend({noConflict:function(b){return a.$===p&&(a.$=i),b&&a.jQuery===p&&(a.jQuery=h),p},isReady:!1,readyWait:1,holdReady:function(a){a?p.readyWait++:p.ready(!0)},ready:function(a){if(a===!0?--p.readyWait:p.isReady)return;if(!e.body)return setTimeout(p.ready,1);p.isReady=!0;if(a!==!0&&--p.readyWait>0)return;d.resolveWith(e,[p]),p.fn.trigger&&p(e).trigger("ready").off("ready")},isFunction:function(a){return p.type(a)==="function"},isArray:Array.isArray||function(a){return p.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):E[m.call(a)]||"object"},isPlainObject:function(a){if(!a||p.type(a)!=="object"||a.nodeType||p.isWindow(a))return!1;try{if(a.constructor&&!n.call(a,"constructor")&&!n.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||n.call(a,d)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},error:function(a){throw new Error(a)},parseHTML:function(a,b,c){var d;return!a||typeof a!="string"?null:(typeof b=="boolean"&&(c=b,b=0),b=b||e,(d=v.exec(a))?[b.createElement(d[1])]:(d=p.buildFragment([a],b,c?null:[]),p.merge([],(d.cacheable?p.clone(d.fragment):d.fragment).childNodes)))},parseJSON:function(b){if(!b||typeof b!="string")return null;b=p.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(w.test(b.replace(y,"@").replace(z,"]").replace(x,"")))return(new Function("return "+b))();p.error("Invalid JSON: "+b)},parseXML:function(c){var d,e;if(!c||typeof c!="string")return null;try{a.DOMParser?(e=new DOMParser,d=e.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(f){d=b}return(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&p.error("Invalid XML: "+c),d},noop:function(){},globalEval:function(b){b&&r.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(A,"ms-").replace(B,C)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var e,f=0,g=a.length,h=g===b||p.isFunction(a);if(d){if(h){for(e in a)if(c.apply(a[e],d)===!1)break}else for(;f<g;)if(c.apply(a[f++],d)===!1)break}else if(h){for(e in a)if(c.call(a[e],e,a[e])===!1)break}else for(;f<g;)if(c.call(a[f],f,a[f++])===!1)break;return a},trim:o?function(a){return a==null?"":o.call(a)}:function(a){return a==null?"":a.toString().replace(t,"")},makeArray:function(a,b){var c,d=b||[];return a!=null&&(c=p.type(a),a.length==null||c==="string"||c==="function"||c==="regexp"||p.isWindow(a)?j.call(d,a):p.merge(d,a)),d},inArray:function(a,b,c){var d;if(b){if(l)return l.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=c.length,e=a.length,f=0;if(typeof d=="number")for(;f<d;f++)a[e++]=c[f];else while(c[f]!==b)a[e++]=c[f++];return a.length=e,a},grep:function(a,b,c){var d,e=[],f=0,g=a.length;c=!!c;for(;f<g;f++)d=!!b(a[f],f),c!==d&&e.push(a[f]);return e},map:function(a,c,d){var e,f,g=[],h=0,i=a.length,j=a instanceof p||i!==b&&typeof i=="number"&&(i>0&&a[0]&&a[i-1]||i===0||p.isArray(a));if(j)for(;h<i;h++)e=c(a[h],h,d),e!=null&&(g[g.length]=e);else for(f in a)e=c(a[f],f,d),e!=null&&(g[g.length]=e);return g.concat.apply([],g)},guid:1,proxy:function(a,c){var d,e,f;return typeof c=="string"&&(d=a[c],c=a,a=d),p.isFunction(a)?(e=k.call(arguments,2),f=function(){return a.apply(c,e.concat(k.call(arguments)))},f.guid=a.guid=a.guid||f.guid||p.guid++,f):b},access:function(a,c,d,e,f,g,h){var i,j=d==null,k=0,l=a.length;if(d&&typeof d=="object"){for(k in d)p.access(a,c,k,d[k],1,g,e);f=1}else if(e!==b){i=h===b&&p.isFunction(e),j&&(i?(i=c,c=function(a,b,c){return i.call(p(a),c)}):(c.call(a,e),c=null));if(c)for(;k<l;k++)c(a[k],d,i?e.call(a[k],k,c(a[k],d)):e,h);f=1}return f?a:j?c.call(a):l?c(a[0],d):g},now:function(){return(new Date).getTime()}}),p.ready.promise=function(b){if(!d){d=p.Deferred();if(e.readyState==="complete"||e.readyState!=="loading"&&e.addEventListener)setTimeout(p.ready,1);else if(e.addEventListener)e.addEventListener("DOMContentLoaded",D,!1),a.addEventListener("load",p.ready,!1);else{e.attachEvent("onreadystatechange",D),a.attachEvent("onload",p.ready);var c=!1;try{c=a.frameElement==null&&e.documentElement}catch(f){}c&&c.doScroll&&function g(){if(!p.isReady){try{c.doScroll("left")}catch(a){return setTimeout(g,50)}p.ready()}}()}}return d.promise(b)},p.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){E["[object "+b+"]"]=b.toLowerCase()}),c=p(e);var F={};p.Callbacks=function(a){a=typeof a=="string"?F[a]||G(a):p.extend({},a);var c,d,e,f,g,h,i=[],j=!a.once&&[],k=function(b){c=a.memory&&b,d=!0,h=f||0,f=0,g=i.length,e=!0;for(;i&&h<g;h++)if(i[h].apply(b[0],b[1])===!1&&a.stopOnFalse){c=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):c?i=[]:l.disable())},l={add:function(){if(i){var b=i.length;(function d(b){p.each(b,function(b,c){p.isFunction(c)&&(!a.unique||!l.has(c))?i.push(c):c&&c.length&&d(c)})})(arguments),e?g=i.length:c&&(f=b,k(c))}return this},remove:function(){return i&&p.each(arguments,function(a,b){var c;while((c=p.inArray(b,i,c))>-1)i.splice(c,1),e&&(c<=g&&g--,c<=h&&h--)}),this},has:function(a){return p.inArray(a,i)>-1},empty:function(){return i=[],this},disable:function(){return i=j=c=b,this},disabled:function(){return!i},lock:function(){return j=b,c||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return b=b||[],b=[a,b.slice?b.slice():b],i&&(!d||j)&&(e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},p.extend({Deferred:function(a){var b=[["resolve","done",p.Callbacks("once memory"),"resolved"],["reject","fail",p.Callbacks("once memory"),"rejected"],["notify","progress",p.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return p.Deferred(function(c){p.each(b,function(b,d){var f=d[0],g=a[b];e[d[1]](p.isFunction(g)?function(){var a=g.apply(this,arguments);a&&p.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f+"With"](this===e?c:this,[a])}:c[f])}),a=null}).promise()},promise:function(a){return typeof a=="object"?p.extend(a,d):d}},e={};return d.pipe=d.then,p.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock),e[f[0]]=g.fire,e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=k.call(arguments),d=c.length,e=d!==1||a&&p.isFunction(a.promise)?d:0,f=e===1?a:p.Deferred(),g=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?k.call(arguments):d,c===h?f.notifyWith(b,c):--e||f.resolveWith(b,c)}},h,i,j;if(d>1){h=new Array(d),i=new Array(d),j=new Array(d);for(;b<d;b++)c[b]&&p.isFunction(c[b].promise)?c[b].promise().done(g(b,j,c)).fail(f.reject).progress(g(b,i,h)):--e}return e||f.resolveWith(j,c),f.promise()}}),p.support=function(){var b,c,d,f,g,h,i,j,k,l,m,n=e.createElement("div");n.setAttribute("className","t"),n.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",c=n.getElementsByTagName("*"),d=n.getElementsByTagName("a")[0],d.style.cssText="top:1px;float:left;opacity:.5";if(!c||!c.length||!d)return{};f=e.createElement("select"),g=f.appendChild(e.createElement("option")),h=n.getElementsByTagName("input")[0],b={leadingWhitespace:n.firstChild.nodeType===3,tbody:!n.getElementsByTagName("tbody").length,htmlSerialize:!!n.getElementsByTagName("link").length,style:/top/.test(d.getAttribute("style")),hrefNormalized:d.getAttribute("href")==="/a",opacity:/^0.5/.test(d.style.opacity),cssFloat:!!d.style.cssFloat,checkOn:h.value==="on",optSelected:g.selected,getSetAttribute:n.className!=="t",enctype:!!e.createElement("form").enctype,html5Clone:e.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:e.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},h.checked=!0,b.noCloneChecked=h.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled;try{delete n.test}catch(o){b.deleteExpando=!1}!n.addEventListener&&n.attachEvent&&n.fireEvent&&(n.attachEvent("onclick",m=function(){b.noCloneEvent=!1}),n.cloneNode(!0).fireEvent("onclick"),n.detachEvent("onclick",m)),h=e.createElement("input"),h.value="t",h.setAttribute("type","radio"),b.radioValue=h.value==="t",h.setAttribute("checked","checked"),h.setAttribute("name","t"),n.appendChild(h),i=e.createDocumentFragment(),i.appendChild(n.lastChild),b.checkClone=i.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=h.checked,i.removeChild(h),i.appendChild(n);if(n.attachEvent)for(k in{submit:!0,change:!0,focusin:!0})j="on"+k,l=j in n,l||(n.setAttribute(j,"return;"),l=typeof n[j]=="function"),b[k+"Bubbles"]=l;return p(function(){var c,d,f,g,h="padding:0;margin:0;border:0;display:block;overflow:hidden;",i=e.getElementsByTagName("body")[0];if(!i)return;c=e.createElement("div"),c.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",i.insertBefore(c,i.firstChild),d=e.createElement("div"),c.appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",f=d.getElementsByTagName("td"),f[0].style.cssText="padding:0;margin:0;border:0;display:none",l=f[0].offsetHeight===0,f[0].style.display="",f[1].style.display="none",b.reliableHiddenOffsets=l&&f[0].offsetHeight===0,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",b.boxSizing=d.offsetWidth===4,b.doesNotIncludeMarginInBodyOffset=i.offsetTop!==1,a.getComputedStyle&&(b.pixelPosition=(a.getComputedStyle(d,null)||{}).top!=="1%",b.boxSizingReliable=(a.getComputedStyle(d,null)||{width:"4px"}).width==="4px",g=e.createElement("div"),g.style.cssText=d.style.cssText=h,g.style.marginRight=g.style.width="0",d.style.width="1px",d.appendChild(g),b.reliableMarginRight=!parseFloat((a.getComputedStyle(g,null)||{}).marginRight)),typeof d.style.zoom!="undefined"&&(d.innerHTML="",d.style.cssText=h+"width:1px;padding:1px;display:inline;zoom:1",b.inlineBlockNeedsLayout=d.offsetWidth===3,d.style.display="block",d.style.overflow="visible",d.innerHTML="<div></div>",d.firstChild.style.width="5px",b.shrinkWrapBlocks=d.offsetWidth!==3,c.style.zoom=1),i.removeChild(c),c=d=f=g=null}),i.removeChild(n),c=d=f=g=h=i=n=null,b}();var H=/^(?:\{.*\}|\[.*\])$/,I=/([A-Z])/g;p.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(p.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){return a=a.nodeType?p.cache[a[p.expando]]:a[p.expando],!!a&&!K(a)},data:function(a,c,d,e){if(!p.acceptData(a))return;var f,g,h=p.expando,i=typeof c=="string",j=a.nodeType,k=j?p.cache:a,l=j?a[h]:a[h]&&h;if((!l||!k[l]||!e&&!k[l].data)&&i&&d===b)return;l||(j?a[h]=l=p.deletedIds.pop()||++p.uuid:l=h),k[l]||(k[l]={},j||(k[l].toJSON=p.noop));if(typeof c=="object"||typeof c=="function")e?k[l]=p.extend(k[l],c):k[l].data=p.extend(k[l].data,c);return f=k[l],e||(f.data||(f.data={}),f=f.data),d!==b&&(f[p.camelCase(c)]=d),i?(g=f[c],g==null&&(g=f[p.camelCase(c)])):g=f,g},removeData:function(a,b,c){if(!p.acceptData(a))return;var d,e,f,g=a.nodeType,h=g?p.cache:a,i=g?a[p.expando]:p.expando;if(!h[i])return;if(b){d=c?h[i]:h[i].data;if(d){p.isArray(b)||(b in d?b=[b]:(b=p.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,f=b.length;e<f;e++)delete d[b[e]];if(!(c?K:p.isEmptyObject)(d))return}}if(!c){delete h[i].data;if(!K(h[i]))return}g?p.cleanData([a],!0):p.support.deleteExpando||h!=h.window?delete h[i]:h[i]=null},_data:function(a,b,c){return p.data(a,b,c,!0)},acceptData:function(a){var b=a.nodeName&&p.noData[a.nodeName.toLowerCase()];return!b||b!==!0&&a.getAttribute("classid")===b}}),p.fn.extend({data:function(a,c){var d,e,f,g,h,i=this[0],j=0,k=null;if(a===b){if(this.length){k=p.data(i);if(i.nodeType===1&&!p._data(i,"parsedAttrs")){f=i.attributes;for(h=f.length;j<h;j++)g=f[j].name,g.indexOf("data-")===0&&(g=p.camelCase(g.substring(5)),J(i,g,k[g]));p._data(i,"parsedAttrs",!0)}}return k}return typeof a=="object"?this.each(function(){p.data(this,a)}):(d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!",p.access(this,function(c){if(c===b)return k=this.triggerHandler("getData"+e,[d[0]]),k===b&&i&&(k=p.data(i,a),k=J(i,a,k)),k===b&&d[1]?this.data(d[0]):k;d[1]=c,this.each(function(){var b=p(this);b.triggerHandler("setData"+e,d),p.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1))},removeData:function(a){return this.each(function(){p.removeData(this,a)})}}),p.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=p._data(a,b),c&&(!d||p.isArray(c)?d=p._data(a,b,p.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=p.queue(a,b),d=c.shift(),e=p._queueHooks(a,b),f=function(){p.dequeue(a,b)};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),delete e.stop,d.call(a,f,e)),!c.length&&e&&e.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return p._data(a,c)||p._data(a,c,{empty:p.Callbacks("once memory").add(function(){p.removeData(a,b+"queue",!0),p.removeData(a,c,!0)})})}}),p.fn.extend({queue:function(a,c){var d=2;return typeof a!="string"&&(c=a,a="fx",d--),arguments.length<d?p.queue(this[0],a):c===b?this:this.each(function(){var b=p.queue(this,a,c);p._queueHooks(this,a),a==="fx"&&b[0]!=="inprogress"&&p.dequeue(this,a)})},dequeue:function(a){return this.each(function(){p.dequeue(this,a)})},delay:function(a,b){return a=p.fx?p.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){var d,e=1,f=p.Deferred(),g=this,h=this.length,i=function(){--e||f.resolveWith(g,[g])};typeof a!="string"&&(c=a,a=b),a=a||"fx";while(h--)(d=p._data(g[h],a+"queueHooks"))&&d.empty&&(e++,d.empty.add(i));return i(),f.promise(c)}});var L,M,N,O=/[\t\r\n]/g,P=/\r/g,Q=/^(?:button|input)$/i,R=/^(?:button|input|object|select|textarea)$/i,S=/^a(?:rea|)$/i,T=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,U=p.support.getSetAttribute;p.fn.extend({attr:function(a,b){return p.access(this,p.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){p.removeAttr(this,a)})},prop:function(a,b){return p.access(this,p.prop,a,b,arguments.length>1)},removeProp:function(a){return a=p.propFix[a]||a,this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,f,g,h;if(p.isFunction(a))return this.each(function(b){p(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(s);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{f=" "+e.className+" ";for(g=0,h=b.length;g<h;g++)~f.indexOf(" "+b[g]+" ")||(f+=b[g]+" ");e.className=p.trim(f)}}}return this},removeClass:function(a){var c,d,e,f,g,h,i;if(p.isFunction(a))return this.each(function(b){p(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(s);for(h=0,i=this.length;h<i;h++){e=this[h];if(e.nodeType===1&&e.className){d=(" "+e.className+" ").replace(O," ");for(f=0,g=c.length;f<g;f++)while(d.indexOf(" "+c[f]+" ")>-1)d=d.replace(" "+c[f]+" "," ");e.className=a?p.trim(d):""}}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";return p.isFunction(a)?this.each(function(c){p(this).toggleClass(a.call(this,c,this.className,b),b)}):this.each(function(){if(c==="string"){var e,f=0,g=p(this),h=b,i=a.split(s);while(e=i[f++])h=d?h:!g.hasClass(e),g[h?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&p._data(this,"__className__",this.className),this.className=this.className||a===!1?"":p._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(O," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,f=this[0];if(!arguments.length){if(f)return c=p.valHooks[f.type]||p.valHooks[f.nodeName.toLowerCase()],c&&"get"in c&&(d=c.get(f,"value"))!==b?d:(d=f.value,typeof d=="string"?d.replace(P,""):d==null?"":d);return}return e=p.isFunction(a),this.each(function(d){var f,g=p(this);if(this.nodeType!==1)return;e?f=a.call(this,d,g.val()):f=a,f==null?f="":typeof f=="number"?f+="":p.isArray(f)&&(f=p.map(f,function(a){return a==null?"":a+""})),c=p.valHooks[this.type]||p.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,f,"value")===b)this.value=f})}}),p.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,f=a.selectedIndex,g=[],h=a.options,i=a.type==="select-one";if(f<0)return null;c=i?f:0,d=i?f+1:h.length;for(;c<d;c++){e=h[c];if(e.selected&&(p.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!p.nodeName(e.parentNode,"optgroup"))){b=p(e).val();if(i)return b;g.push(b)}}return i&&!g.length&&h.length?p(h[f]).val():g},set:function(a,b){var c=p.makeArray(b);return p(a).find("option").each(function(){this.selected=p.inArray(p(this).val(),c)>=0}),c.length||(a.selectedIndex=-1),c}}},attrFn:{},attr:function(a,c,d,e){var f,g,h,i=a.nodeType;if(!a||i===3||i===8||i===2)return;if(e&&p.isFunction(p.fn[c]))return p(a)[c](d);if(typeof a.getAttribute=="undefined")return p.prop(a,c,d);h=i!==1||!p.isXMLDoc(a),h&&(c=c.toLowerCase(),g=p.attrHooks[c]||(T.test(c)?M:L));if(d!==b){if(d===null){p.removeAttr(a,c);return}return g&&"set"in g&&h&&(f=g.set(a,d,c))!==b?f:(a.setAttribute(c,""+d),d)}return g&&"get"in g&&h&&(f=g.get(a,c))!==null?f:(f=a.getAttribute(c),f===null?b:f)},removeAttr:function(a,b){var c,d,e,f,g=0;if(b&&a.nodeType===1){d=b.split(s);for(;g<d.length;g++)e=d[g],e&&(c=p.propFix[e]||e,f=T.test(e),f||p.attr(a,e,""),a.removeAttribute(U?e:c),f&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(Q.test(a.nodeName)&&a.parentNode)p.error("type property can't be changed");else if(!p.support.radioValue&&b==="radio"&&p.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}},value:{get:function(a,b){return L&&p.nodeName(a,"button")?L.get(a,b):b in a?a.value:null},set:function(a,b,c){if(L&&p.nodeName(a,"button"))return L.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,f,g,h=a.nodeType;if(!a||h===3||h===8||h===2)return;return g=h!==1||!p.isXMLDoc(a),g&&(c=p.propFix[c]||c,f=p.propHooks[c]),d!==b?f&&"set"in f&&(e=f.set(a,d,c))!==b?e:a[c]=d:f&&"get"in f&&(e=f.get(a,c))!==null?e:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):R.test(a.nodeName)||S.test(a.nodeName)&&a.href?0:b}}}}),M={get:function(a,c){var d,e=p.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;return b===!1?p.removeAttr(a,c):(d=p.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase())),c}},U||(N={name:!0,id:!0,coords:!0},L=p.valHooks.button={get:function(a,c){var d;return d=a.getAttributeNode(c),d&&(N[c]?d.value!=="":d.specified)?d.value:b},set:function(a,b,c){var d=a.getAttributeNode(c);return d||(d=e.createAttribute(c),a.setAttributeNode(d)),d.value=b+""}},p.each(["width","height"],function(a,b){p.attrHooks[b]=p.extend(p.attrHooks[b],{set:function(a,c){if(c==="")return a.setAttribute(b,"auto"),c}})}),p.attrHooks.contenteditable={get:L.get,set:function(a,b,c){b===""&&(b="false"),L.set(a,b,c)}}),p.support.hrefNormalized||p.each(["href","src","width","height"],function(a,c){p.attrHooks[c]=p.extend(p.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),p.support.style||(p.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),p.support.optSelected||(p.propHooks.selected=p.extend(p.propHooks.selected,{get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}})),p.support.enctype||(p.propFix.enctype="encoding"),p.support.checkOn||p.each(["radio","checkbox"],function(){p.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),p.each(["radio","checkbox"],function(){p.valHooks[this]=p.extend(p.valHooks[this],{set:function(a,b){if(p.isArray(b))return a.checked=p.inArray(p(a).val(),b)>=0}})});var V=/^(?:textarea|input|select)$/i,W=/^([^\.]*|)(?:\.(.+)|)$/,X=/(?:^|\s)hover(\.\S+|)\b/,Y=/^key/,Z=/^(?:mouse|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=function(a){return p.event.special.hover?a:a.replace(X,"mouseenter$1 mouseleave$1")};p.event={add:function(a,c,d,e,f){var g,h,i,j,k,l,m,n,o,q,r;if(a.nodeType===3||a.nodeType===8||!c||!d||!(g=p._data(a)))return;d.handler&&(o=d,d=o.handler,f=o.selector),d.guid||(d.guid=p.guid++),i=g.events,i||(g.events=i={}),h=g.handle,h||(g.handle=h=function(a){return typeof p!="undefined"&&(!a||p.event.triggered!==a.type)?p.event.dispatch.apply(h.elem,arguments):b},h.elem=a),c=p.trim(_(c)).split(" ");for(j=0;j<c.length;j++){k=W.exec(c[j])||[],l=k[1],m=(k[2]||"").split(".").sort(),r=p.event.special[l]||{},l=(f?r.delegateType:r.bindType)||l,r=p.event.special[l]||{},n=p.extend({type:l,origType:k[1],data:e,handler:d,guid:d.guid,selector:f,namespace:m.join(".")},o),q=i[l];if(!q){q=i[l]=[],q.delegateCount=0;if(!r.setup||r.setup.call(a,e,m,h)===!1)a.addEventListener?a.addEventListener(l,h,!1):a.attachEvent&&a.attachEvent("on"+l,h)}r.add&&(r.add.call(a,n),n.handler.guid||(n.handler.guid=d.guid)),f?q.splice(q.delegateCount++,0,n):q.push(n),p.event.global[l]=!0}a=null},global:{},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,q,r=p.hasData(a)&&p._data(a);if(!r||!(m=r.events))return;b=p.trim(_(b||"")).split(" ");for(f=0;f<b.length;f++){g=W.exec(b[f])||[],h=i=g[1],j=g[2];if(!h){for(h in m)p.event.remove(a,h+b[f],c,d,!0);continue}n=p.event.special[h]||{},h=(d?n.delegateType:n.bindType)||h,o=m[h]||[],k=o.length,j=j?new RegExp("(^|\\.)"+j.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(l=0;l<o.length;l++)q=o[l],(e||i===q.origType)&&(!c||c.guid===q.guid)&&(!j||j.test(q.namespace))&&(!d||d===q.selector||d==="**"&&q.selector)&&(o.splice(l--,1),q.selector&&o.delegateCount--,n.remove&&n.remove.call(a,q));o.length===0&&k!==o.length&&((!n.teardown||n.teardown.call(a,j,r.handle)===!1)&&p.removeEvent(a,h,r.handle),delete m[h])}p.isEmptyObject(m)&&(delete r.handle,p.removeData(a,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,f,g){if(!f||f.nodeType!==3&&f.nodeType!==8){var h,i,j,k,l,m,n,o,q,r,s=c.type||c,t=[];if($.test(s+p.event.triggered))return;s.indexOf("!")>=0&&(s=s.slice(0,-1),i=!0),s.indexOf(".")>=0&&(t=s.split("."),s=t.shift(),t.sort());if((!f||p.event.customEvent[s])&&!p.event.global[s])return;c=typeof c=="object"?c[p.expando]?c:new p.Event(s,c):new p.Event(s),c.type=s,c.isTrigger=!0,c.exclusive=i,c.namespace=t.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+t.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,m=s.indexOf(":")<0?"on"+s:"";if(!f){h=p.cache;for(j in h)h[j].events&&h[j].events[s]&&p.event.trigger(c,d,h[j].handle.elem,!0);return}c.result=b,c.target||(c.target=f),d=d!=null?p.makeArray(d):[],d.unshift(c),n=p.event.special[s]||{};if(n.trigger&&n.trigger.apply(f,d)===!1)return;q=[[f,n.bindType||s]];if(!g&&!n.noBubble&&!p.isWindow(f)){r=n.delegateType||s,k=$.test(r+s)?f:f.parentNode;for(l=f;k;k=k.parentNode)q.push([k,r]),l=k;l===(f.ownerDocument||e)&&q.push([l.defaultView||l.parentWindow||a,r])}for(j=0;j<q.length&&!c.isPropagationStopped();j++)k=q[j][0],c.type=q[j][1],o=(p._data(k,"events")||{})[c.type]&&p._data(k,"handle"),o&&o.apply(k,d),o=m&&k[m],o&&p.acceptData(k)&&o.apply(k,d)===!1&&c.preventDefault();return c.type=s,!g&&!c.isDefaultPrevented()&&(!n._default||n._default.apply(f.ownerDocument,d)===!1)&&(s!=="click"||!p.nodeName(f,"a"))&&p.acceptData(f)&&m&&f[s]&&(s!=="focus"&&s!=="blur"||c.target.offsetWidth!==0)&&!p.isWindow(f)&&(l=f[m],l&&(f[m]=null),p.event.triggered=s,f[s](),p.event.triggered=b,l&&(f[m]=l)),c.result}return},dispatch:function(c){c=p.event.fix(c||a.event);var d,e,f,g,h,i,j,k,l,m,n,o=(p._data(this,"events")||{})[c.type]||[],q=o.delegateCount,r=[].slice.call(arguments),s=!c.exclusive&&!c.namespace,t=p.event.special[c.type]||{},u=[];r[0]=c,c.delegateTarget=this;if(t.preDispatch&&t.preDispatch.call(this,c)===!1)return;if(q&&(!c.button||c.type!=="click")){g=p(this),g.context=this;for(f=c.target;f!=this;f=f.parentNode||this)if(f.disabled!==!0||c.type!=="click"){i={},k=[],g[0]=f;for(d=0;d<q;d++)l=o[d],m=l.selector,i[m]===b&&(i[m]=g.is(m)),i[m]&&k.push(l);k.length&&u.push({elem:f,matches:k})}}o.length>q&&u.push({elem:this,matches:o.slice(q)});for(d=0;d<u.length&&!c.isPropagationStopped();d++){j=u[d],c.currentTarget=j.elem;for(e=0;e<j.matches.length&&!c.isImmediatePropagationStopped();e++){l=j.matches[e];if(s||!c.namespace&&!l.namespace||c.namespace_re&&c.namespace_re.test(l.namespace))c.data=l.data,c.handleObj=l,h=((p.event.special[l.origType]||{}).handle||l.handler).apply(j.elem,r),h!==b&&(c.result=h,h===!1&&(c.preventDefault(),c.stopPropagation()))}}return t.postDispatch&&t.postDispatch.call(this,c),c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,c){var d,f,g,h=c.button,i=c.fromElement;return a.pageX==null&&c.clientX!=null&&(d=a.target.ownerDocument||e,f=d.documentElement,g=d.body,a.pageX=c.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=c.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?c.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0),a}},fix:function(a){if(a[p.expando])return a;var b,c,d=a,f=p.event.fixHooks[a.type]||{},g=f.props?this.props.concat(f.props):this.props;a=p.Event(d);for(b=g.length;b;)c=g[--b],a[c]=d[c];return a.target||(a.target=d.srcElement||e),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,f.filter?f.filter(a,d):a},special:{ready:{setup:p.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){p.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=p.extend(new p.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?p.event.trigger(e,null,b):p.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},p.event.handle=p.event.dispatch,p.removeEvent=e.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]=="undefined"&&(a[d]=null),a.detachEvent(d,c))},p.Event=function(a,b){if(this instanceof p.Event)a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?bb:ba):this.type=a,b&&p.extend(this,b),this.timeStamp=a&&a.timeStamp||p.now(),this[p.expando]=!0;else return new p.Event(a,b)},p.Event.prototype={preventDefault:function(){this.isDefaultPrevented=bb;var a=this.originalEvent;if(!a)return;a.preventDefault?a.preventDefault():a.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=bb;var a=this.originalEvent;if(!a)return;a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=bb,this.stopPropagation()},isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba},p.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){p.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj,g=f.selector;if(!e||e!==d&&!p.contains(d,e))a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b;return c}}}),p.support.submitBubbles||(p.event.special.submit={setup:function(){if(p.nodeName(this,"form"))return!1;p.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=p.nodeName(c,"input")||p.nodeName(c,"button")?c.form:b;d&&!p._data(d,"_submit_attached")&&(p.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),p._data(d,"_submit_attached",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&p.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(p.nodeName(this,"form"))return!1;p.event.remove(this,"._submit")}}),p.support.changeBubbles||(p.event.special.change={setup:function(){if(V.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")p.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),p.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),p.event.simulate("change",this,a,!0)});return!1}p.event.add(this,"beforeactivate._change",function(a){var b=a.target;V.test(b.nodeName)&&!p._data(b,"_change_attached")&&(p.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&p.event.simulate("change",this.parentNode,a,!0)}),p._data(b,"_change_attached",!0))})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){return p.event.remove(this,"._change"),V.test(this.nodeName)}}),p.support.focusinBubbles||p.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){p.event.simulate(b,a.target,p.event.fix(a),!0)};p.event.special[b]={setup:function(){c++===0&&e.addEventListener(a,d,!0)},teardown:function(){--c===0&&e.removeEventListener(a,d,!0)}}}),p.fn.extend({on:function(a,c,d,e,f){var g,h;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(h in a)this.on(h,c,d,a[h],f);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=ba;else if(!e)return this;return f===1&&(g=e,e=function(a){return p().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=p.guid++)),this.each(function(){p.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){var e,f;if(a&&a.preventDefault&&a.handleObj)return e=a.handleObj,p(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler),this;if(typeof a=="object"){for(f in a)this.off(f,c,a[f]);return this}if(c===!1||typeof c=="function")d=c,c=b;return d===!1&&(d=ba),this.each(function(){p.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){return p(this.context).on(a,this.selector,b,c),this},die:function(a,b){return p(this.context).off(a,this.selector||"**",b),this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a||"**",c)},trigger:function(a,b){return this.each(function(){p.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return p.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||p.guid++,d=0,e=function(c){var e=(p._data(this,"lastToggle"+a.guid)||0)%d;return p._data(this,"lastToggle"+a.guid,e+1),c.preventDefault(),b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),p.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){p.fn[b]=function(a,c){return c==null&&(c=a,a=null),arguments.length>0?this.on(b,null,a,c):this.trigger(b)},Y.test(b)&&(p.event.fixHooks[b]=p.event.keyHooks),Z.test(b)&&(p.event.fixHooks[b]=p.event.mouseHooks)}),function(a,b){function bd(a,b,c,d){var e=0,f=b.length;for(;e<f;e++)Z(a,b[e],c,d)}function be(a,b,c,d,e,f){var g,h=$.setFilters[b.toLowerCase()];return h||Z.error(b),(a||!(g=e))&&bd(a||"*",d,g=[],e),g.length>0?h(g,c,f):[]}function bf(a,c,d,e,f){var g,h,i,j,k,l,m,n,p=0,q=f.length,s=L.POS,t=new RegExp("^"+s.source+"(?!"+r+")","i"),u=function(){var a=1,c=arguments.length-2;for(;a<c;a++)arguments[a]===b&&(g[a]=b)};for(;p<q;p++){s.exec(""),a=f[p],j=[],i=0,k=e;while(g=s.exec(a)){n=s.lastIndex=g.index+g[0].length;if(n>i){m=a.slice(i,g.index),i=n,l=[c],B.test(m)&&(k&&(l=k),k=e);if(h=H.test(m))m=m.slice(0,-5).replace(B,"$&*");g.length>1&&g[0].replace(t,u),k=be(m,g[1],g[2],l,k,h)}}k?(j=j.concat(k),(m=a.slice(i))&&m!==")"?B.test(m)?bd(m,j,d,e):Z(m,c,d,e?e.concat(k):k):o.apply(d,j)):Z(a,c,d,e)}return q===1?d:Z.uniqueSort(d)}function bg(a,b,c){var d,e,f,g=[],i=0,j=D.exec(a),k=!j.pop()&&!j.pop(),l=k&&a.match(C)||[""],m=$.preFilter,n=$.filter,o=!c&&b!==h;for(;(e=l[i])!=null&&k;i++){g.push(d=[]),o&&(e=" "+e);while(e){k=!1;if(j=B.exec(e))e=e.slice(j[0].length),k=d.push({part:j.pop().replace(A," "),captures:j});for(f in n)(j=L[f].exec(e))&&(!m[f]||(j=m[f](j,b,c)))&&(e=e.slice(j.shift().length),k=d.push({part:f,captures:j}));if(!k)break}}return k||Z.error(a),g}function bh(a,b,e){var f=b.dir,g=m++;return a||(a=function(a){return a===e}),b.first?function(b,c){while(b=b[f])if(b.nodeType===1)return a(b,c)&&b}:function(b,e){var h,i=g+"."+d,j=i+"."+c;while(b=b[f])if(b.nodeType===1){if((h=b[q])===j)return b.sizset;if(typeof h=="string"&&h.indexOf(i)===0){if(b.sizset)return b}else{b[q]=j;if(a(b,e))return b.sizset=!0,b;b.sizset=!1}}}}function bi(a,b){return a?function(c,d){var e=b(c,d);return e&&a(e===!0?c:e,d)}:b}function bj(a,b,c){var d,e,f=0;for(;d=a[f];f++)$.relative[d.part]?e=bh(e,$.relative[d.part],b):(d.captures.push(b,c),e=bi(e,$.filter[d.part].apply(null,d.captures)));return e}function bk(a){return function(b,c){var d,e=0;for(;d=a[e];e++)if(d(b,c))return!0;return!1}}var c,d,e,f,g,h=a.document,i=h.documentElement,j="undefined",k=!1,l=!0,m=0,n=[].slice,o=[].push,q=("sizcache"+Math.random()).replace(".",""),r="[\\x20\\t\\r\\n\\f]",s="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",t=s.replace("w","w#"),u="([*^$|!~]?=)",v="\\["+r+"*("+s+")"+r+"*(?:"+u+r+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+t+")|)|)"+r+"*\\]",w=":("+s+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|((?:[^,]|\\\\,|(?:,(?=[^\\[]*\\]))|(?:,(?=[^\\(]*\\))))*))\\)|)",x=":(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\)|)(?=[^-]|$)",y=r+"*([\\x20\\t\\r\\n\\f>+~])"+r+"*",z="(?=[^\\x20\\t\\r\\n\\f])(?:\\\\.|"+v+"|"+w.replace(2,7)+"|[^\\\\(),])+",A=new RegExp("^"+r+"+|((?:^|[^\\\\])(?:\\\\.)*)"+r+"+$","g"),B=new RegExp("^"+y),C=new RegExp(z+"?(?="+r+"*,|$)","g"),D=new RegExp("^(?:(?!,)(?:(?:^|,)"+r+"*"+z+")*?|"+r+"*(.*?))(\\)|$)"),E=new RegExp(z.slice(19,-6)+"\\x20\\t\\r\\n\\f>+~])+|"+y,"g"),F=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,G=/[\x20\t\r\n\f]*[+~]/,H=/:not\($/,I=/h\d/i,J=/input|select|textarea|button/i,K=/\\(?!\\)/g,L={ID:new RegExp("^#("+s+")"),CLASS:new RegExp("^\\.("+s+")"),NAME:new RegExp("^\\[name=['\"]?("+s+")['\"]?\\]"),TAG:new RegExp("^("+s.replace("[-","[-\\*")+")"),ATTR:new RegExp("^"+v),PSEUDO:new RegExp("^"+w),CHILD:new RegExp("^:(only|nth|last|first)-child(?:\\("+r+"*(even|odd|(([+-]|)(\\d*)n|)"+r+"*(?:([+-]|)"+r+"*(\\d+)|))"+r+"*\\)|)","i"),POS:new RegExp(x,"ig"),needsContext:new RegExp("^"+r+"*[>+~]|"+x,"i")},M={},N=[],O={},P=[],Q=function(a){return a.sizzleFilter=!0,a},R=function(a){return function(b){return b.nodeName.toLowerCase()==="input"&&b.type===a}},S=function(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}},T=function(a){var b=!1,c=h.createElement("div");try{b=a(c)}catch(d){}return c=null,b},U=T(function(a){a.innerHTML="<select></select>";var b=typeof a.lastChild.getAttribute("multiple");return b!=="boolean"&&b!=="string"}),V=T(function(a){a.id=q+0,a.innerHTML="<a name='"+q+"'></a><div name='"+q+"'></div>",i.insertBefore(a,i.firstChild);var b=h.getElementsByName&&h.getElementsByName(q).length===2+h.getElementsByName(q+0).length;return g=!h.getElementById(q),i.removeChild(a),b}),W=T(function(a){return a.appendChild(h.createComment("")),a.getElementsByTagName("*").length===0}),X=T(function(a){return a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!==j&&a.firstChild.getAttribute("href")==="#"}),Y=T(function(a){return a.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!a.getElementsByClassName||a.getElementsByClassName("e").length===0?!1:(a.lastChild.className="e",a.getElementsByClassName("e").length!==1)}),Z=function(a,b,c,d){c=c||[],b=b||h;var e,f,g,i,j=b.nodeType;if(j!==1&&j!==9)return[];if(!a||typeof a!="string")return c;g=ba(b);if(!g&&!d)if(e=F.exec(a))if(i=e[1]){if(j===9){f=b.getElementById(i);if(!f||!f.parentNode)return c;if(f.id===i)return c.push(f),c}else if(b.ownerDocument&&(f=b.ownerDocument.getElementById(i))&&bb(b,f)&&f.id===i)return c.push(f),c}else{if(e[2])return o.apply(c,n.call(b.getElementsByTagName(a),0)),c;if((i=e[3])&&Y&&b.getElementsByClassName)return o.apply(c,n.call(b.getElementsByClassName(i),0)),c}return bm(a,b,c,d,g)},$=Z.selectors={cacheLength:50,match:L,order:["ID","TAG"],attrHandle:{},createPseudo:Q,find:{ID:g?function(a,b,c){if(typeof b.getElementById!==j&&!c){var d=b.getElementById(a);return d&&d.parentNode?[d]:[]}}:function(a,c,d){if(typeof c.getElementById!==j&&!d){var e=c.getElementById(a);return e?e.id===a||typeof e.getAttributeNode!==j&&e.getAttributeNode("id").value===a?[e]:b:[]}},TAG:W?function(a,b){if(typeof b.getElementsByTagName!==j)return b.getElementsByTagName(a)}:function(a,b){var c=b.getElementsByTagName(a);if(a==="*"){var d,e=[],f=0;for(;d=c[f];f++)d.nodeType===1&&e.push(d);return e}return c}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(K,""),a[3]=(a[4]||a[5]||"").replace(K,""),a[2]==="~="&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),a[1]==="nth"?(a[2]||Z.error(a[0]),a[3]=+(a[3]?a[4]+(a[5]||1):2*(a[2]==="even"||a[2]==="odd")),a[4]=+(a[6]+a[7]||a[2]==="odd")):a[2]&&Z.error(a[0]),a},PSEUDO:function(a){var b,c=a[4];return L.CHILD.test(a[0])?null:(c&&(b=D.exec(c))&&b.pop()&&(a[0]=a[0].slice(0,b[0].length-c.length-1),c=b[0].slice(0,-1)),a.splice(2,3,c||a[3]),a)}},filter:{ID:g?function(a){return a=a.replace(K,""),function(b){return b.getAttribute("id")===a}}:function(a){return a=a.replace(K,""),function(b){var c=typeof b.getAttributeNode!==j&&b.getAttributeNode("id");return c&&c.value===a}},TAG:function(a){return a==="*"?function(){return!0}:(a=a.replace(K,"").toLowerCase(),function(b){return b.nodeName&&b.nodeName.toLowerCase()===a})},CLASS:function(a){var b=M[a];return b||(b=M[a]=new RegExp("(^|"+r+")"+a+"("+r+"|$)"),N.push(a),N.length>$.cacheLength&&delete M[N.shift()]),function(a){return b.test(a.className||typeof a.getAttribute!==j&&a.getAttribute("class")||"")}},ATTR:function(a,b,c){return b?function(d){var e=Z.attr(d,a),f=e+"";if(e==null)return b==="!=";switch(b){case"=":return f===c;case"!=":return f!==c;case"^=":return c&&f.indexOf(c)===0;case"*=":return c&&f.indexOf(c)>-1;case"$=":return c&&f.substr(f.length-c.length)===c;case"~=":return(" "+f+" ").indexOf(c)>-1;case"|=":return f===c||f.substr(0,c.length+1)===c+"-"}}:function(b){return Z.attr(b,a)!=null}},CHILD:function(a,b,c,d){if(a==="nth"){var e=m++;return function(a){var b,f,g=0,h=a;if(c===1&&d===0)return!0;b=a.parentNode;if(b&&(b[q]!==e||!a.sizset)){for(h=b.firstChild;h;h=h.nextSibling)if(h.nodeType===1){h.sizset=++g;if(h===a)break}b[q]=e}return f=a.sizset-d,c===0?f===0:f%c===0&&f/c>=0}}return function(b){var c=b;switch(a){case"only":case"first":while(c=c.previousSibling)if(c.nodeType===1)return!1;if(a==="first")return!0;c=b;case"last":while(c=c.nextSibling)if(c.nodeType===1)return!1;return!0}}},PSEUDO:function(a,b,c,d){var e=$.pseudos[a]||$.pseudos[a.toLowerCase()];return e||Z.error("unsupported pseudo: "+a),e.sizzleFilter?e(b,c,d):e}},pseudos:{not:Q(function(a,b,c){var d=bl(a.replace(A,"$1"),b,c);return function(a){return!d(a)}}),enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},parent:function(a){return!$.pseudos.empty(a)},empty:function(a){var b;a=a.firstChild;while(a){if(a.nodeName>"@"||(b=a.nodeType)===3||b===4)return!1;a=a.nextSibling}return!0},contains:Q(function(a){return function(b){return(b.textContent||b.innerText||bc(b)).indexOf(a)>-1}}),has:Q(function(a){return function(b){return Z(a,b).length>0}}),header:function(a){return I.test(a.nodeName)},text:function(a){var b,c;return a.nodeName.toLowerCase()==="input"&&(b=a.type)==="text"&&((c=a.getAttribute("type"))==null||c.toLowerCase()===b)},radio:R("radio"),checkbox:R("checkbox"),file:R("file"),password:R("password"),image:R("image"),submit:S("submit"),reset:S("reset"),button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},input:function(a){return J.test(a.nodeName)},focus:function(a){var b=a.ownerDocument;return a===b.activeElement&&(!b.hasFocus||b.hasFocus())&&(!!a.type||!!a.href)},active:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b,c){return c?a.slice(1):[a[0]]},last:function(a,b,c){var d=a.pop();return c?a:[d]},even:function(a,b,c){var d=[],e=c?1:0,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},odd:function(a,b,c){var d=[],e=c?0:1,f=a.length;for(;e<f;e=e+2)d.push(a[e]);return d},lt:function(a,b,c){return c?a.slice(+b):a.slice(0,+b)},gt:function(a,b,c){return c?a.slice(0,+b+1):a.slice(+b+1)},eq:function(a,b,c){var d=a.splice(+b,1);return c?a:d}}};$.setFilters.nth=$.setFilters.eq,$.filters=$.pseudos,X||($.attrHandle={href:function(a){return a.getAttribute("href",2)},type:function(a){return a.getAttribute("type")}}),V&&($.order.push("NAME"),$.find.NAME=function(a,b){if(typeof b.getElementsByName!==j)return b.getElementsByName(a)}),Y&&($.order.splice(1,0,"CLASS"),$.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!==j&&!c)return b.getElementsByClassName(a)});try{n.call(i.childNodes,0)[0].nodeType}catch(_){n=function(a){var b,c=[];for(;b=this[a];a++)c.push(b);return c}}var ba=Z.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":!1},bb=Z.contains=i.compareDocumentPosition?function(a,b){return!!(a.compareDocumentPosition(b)&16)}:i.contains?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b.parentNode;return a===d||!!(d&&d.nodeType===1&&c.contains&&c.contains(d))}:function(a,b){while(b=b.parentNode)if(b===a)return!0;return!1},bc=Z.getText=function(a){var b,c="",d=0,e=a.nodeType;if(e){if(e===1||e===9||e===11){if(typeof a.textContent=="string")return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=bc(a)}else if(e===3||e===4)return a.nodeValue}else for(;b=a[d];d++)c+=bc(b);return c};Z.attr=function(a,b){var c,d=ba(a);return d||(b=b.toLowerCase()),$.attrHandle[b]?$.attrHandle[b](a):U||d?a.getAttribute(b):(c=a.getAttributeNode(b),c?typeof a[b]=="boolean"?a[b]?b:null:c.specified?c.value:null:null)},Z.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},[0,0].sort(function(){return l=0}),i.compareDocumentPosition?e=function(a,b){return a===b?(k=!0,0):(!a.compareDocumentPosition||!b.compareDocumentPosition?a.compareDocumentPosition:a.compareDocumentPosition(b)&4)?-1:1}:(e=function(a,b){if(a===b)return k=!0,0;if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],g=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return f(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)g.unshift(j),j=j.parentNode;c=e.length,d=g.length;for(var l=0;l<c&&l<d;l++)if(e[l]!==g[l])return f(e[l],g[l]);return l===c?f(a,g[l],-1):f(e[l],b,1)},f=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),Z.uniqueSort=function(a){var b,c=1;if(e){k=l,a.sort(e);if(k)for(;b=a[c];c++)b===a[c-1]&&a.splice(c--,1)}return a};var bl=Z.compile=function(a,b,c){var d,e,f,g=O[a];if(g&&g.context===b)return g;e=bg(a,b,c);for(f=0;d=e[f];f++)e[f]=bj(d,b,c);return g=O[a]=bk(e),g.context=b,g.runs=g.dirruns=0,P.push(a),P.length>$.cacheLength&&delete O[P.shift()],g};Z.matches=function(a,b){return Z(a,null,null,b)},Z.matchesSelector=function(a,b){return Z(b,null,null,[a]).length>0};var bm=function(a,b,e,f,g){a=a.replace(A,"$1");var h,i,j,k,l,m,p,q,r,s=a.match(C),t=a.match(E),u=b.nodeType;if(L.POS.test(a))return bf(a,b,e,f,s);if(f)h=n.call(f,0);else if(s&&s.length===1){if(t.length>1&&u===9&&!g&&(s=L.ID.exec(t[0]))){b=$.find.ID(s[1],b,g)[0];if(!b)return e;a=a.slice(t.shift().length)}q=(s=G.exec(t[0]))&&!s.index&&b.parentNode||b,r=t.pop(),m=r.split(":not")[0];for(j=0,k=$.order.length;j<k;j++){p=$.order[j];if(s=L[p].exec(m)){h=$.find[p]((s[1]||"").replace(K,""),q,g);if(h==null)continue;m===r&&(a=a.slice(0,a.length-r.length)+m.replace(L[p],""),a||o.apply(e,n.call(h,0)));break}}}if(a){i=bl(a,b,g),d=i.dirruns++,h==null&&(h=$.find.TAG("*",G.test(a)&&b.parentNode||b));for(j=0;l=h[j];j++)c=i.runs++,i(l,b)&&e.push(l)}return e};h.querySelectorAll&&function(){var a,b=bm,c=/'|\\/g,d=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,e=[],f=[":active"],g=i.matchesSelector||i.mozMatchesSelector||i.webkitMatchesSelector||i.oMatchesSelector||i.msMatchesSelector;T(function(a){a.innerHTML="<select><option selected></option></select>",a.querySelectorAll("[selected]").length||e.push("\\["+r+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),a.querySelectorAll(":checked").length||e.push(":checked")}),T(function(a){a.innerHTML="<p test=''></p>",a.querySelectorAll("[test^='']").length&&e.push("[*^$]="+r+"*(?:\"\"|'')"),a.innerHTML="<input type='hidden'>",a.querySelectorAll(":enabled").length||e.push(":enabled",":disabled")}),e=e.length&&new RegExp(e.join("|")),bm=function(a,d,f,g,h){if(!g&&!h&&(!e||!e.test(a)))if(d.nodeType===9)try{return o.apply(f,n.call(d.querySelectorAll(a),0)),f}catch(i){}else if(d.nodeType===1&&d.nodeName.toLowerCase()!=="object"){var j=d.getAttribute("id"),k=j||q,l=G.test(a)&&d.parentNode||d;j?k=k.replace(c,"\\$&"):d.setAttribute("id",k);try{return o.apply(f,n.call(l.querySelectorAll(a.replace(C,"[id='"+k+"'] $&")),0)),f}catch(i){}finally{j||d.removeAttribute("id")}}return b(a,d,f,g,h)},g&&(T(function(b){a=g.call(b,"div");try{g.call(b,"[test!='']:sizzle"),f.push($.match.PSEUDO)}catch(c){}}),f=new RegExp(f.join("|")),Z.matchesSelector=function(b,c){c=c.replace(d,"='$1']");if(!ba(b)&&!f.test(c)&&(!e||!e.test(c)))try{var h=g.call(b,c);if(h||a||b.document&&b.document.nodeType!==11)return h}catch(i){}return Z(c,null,null,[b]).length>0})}(),Z.attr=p.attr,p.find=Z,p.expr=Z.selectors,p.expr[":"]=p.expr.pseudos,p.unique=Z.uniqueSort,p.text=Z.getText,p.isXMLDoc=Z.isXML,p.contains=Z.contains}(a);var bc=/Until$/,bd=/^(?:parents|prev(?:Until|All))/,be=/^.[^:#\[\.,]*$/,bf=p.expr.match.needsContext,bg={children:!0,contents:!0,next:!0,prev:!0};p.fn.extend({find:function(a){var b,c,d,e,f,g,h=this;if(typeof a!="string")return p(a).filter(function(){for(b=0,c=h.length;b<c;b++)if(p.contains(h[b],this))return!0});g=this.pushStack("","find",a);for(b=0,c=this.length;b<c;b++){d=g.length,p.find(a,this[b],g);if(b>0)for(e=d;e<g.length;e++)for(f=0;f<d;f++)if(g[f]===g[e]){g.splice(e--,1);break}}return g},has:function(a){var b,c=p(a,this),d=c.length;return this.filter(function(){for(b=0;b<d;b++)if(p.contains(this,c[b]))return!0})},not:function(a){return this.pushStack(bj(this,a,!1),"not",a)},filter:function(a){return this.pushStack(bj(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?bf.test(a)?p(a,this.context).index(this[0])>=0:p.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c,d=0,e=this.length,f=[],g=bf.test(a)||typeof a!="string"?p(a,b||this.context):0;for(;d<e;d++){c=this[d];while(c&&c.ownerDocument&&c!==b&&c.nodeType!==11){if(g?g.index(c)>-1:p.find.matchesSelector(c,a)){f.push(c);break}c=c.parentNode}}return f=f.length>1?p.unique(f):f,this.pushStack(f,"closest",a)},index:function(a){return a?typeof a=="string"?p.inArray(this[0],p(a)):p.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(a,b){var c=typeof a=="string"?p(a,b):p.makeArray(a&&a.nodeType?[a]:a),d=p.merge(this.get(),c);return this.pushStack(bh(c[0])||bh(d[0])?d:p.unique(d))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}),p.fn.andSelf=p.fn.addBack,p.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return p.dir(a,"parentNode")},parentsUntil:function(a,b,c){return p.dir(a,"parentNode",c)},next:function(a){return bi(a,"nextSibling")},prev:function(a){return bi(a,"previousSibling")},nextAll:function(a){return p.dir(a,"nextSibling")},prevAll:function(a){return p.dir(a,"previousSibling")},nextUntil:function(a,b,c){return p.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return p.dir(a,"previousSibling",c)},siblings:function(a){return p.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return p.sibling(a.firstChild)},contents:function(a){return p.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:p.merge([],a.childNodes)}},function(a,b){p.fn[a]=function(c,d){var e=p.map(this,b,c);return bc.test(a)||(d=c),d&&typeof d=="string"&&(e=p.filter(d,e)),e=this.length>1&&!bg[a]?p.unique(e):e,this.length>1&&bd.test(a)&&(e=e.reverse()),this.pushStack(e,a,k.call(arguments).join(","))}}),p.extend({filter:function(a,b,c){return c&&(a=":not("+a+")"),b.length===1?p.find.matchesSelector(b[0],a)?[b[0]]:[]:p.find.matches(a,b)},dir:function(a,c,d){var e=[],f=a[c];while(f&&f.nodeType!==9&&(d===b||f.nodeType!==1||!p(f).is(d)))f.nodeType===1&&e.push(f),f=f[c];return e},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var bl="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",bm=/ jQuery\d+="(?:null|\d+)"/g,bn=/^\s+/,bo=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bp=/<([\w:]+)/,bq=/<tbody/i,br=/<|&#?\w+;/,bs=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,bu=new RegExp("<(?:"+bl+")[\\s/>]","i"),bv=/^(?:checkbox|radio)$/,bw=/checked\s*(?:[^=]|=\s*.checked.)/i,bx=/\/(java|ecma)script/i,by=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,bz={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bA=bk(e),bB=bA.appendChild(e.createElement("div"));bz.optgroup=bz.option,bz.tbody=bz.tfoot=bz.colgroup=bz.caption=bz.thead,bz.th=bz.td,p.support.htmlSerialize||(bz._default=[1,"X<div>","</div>"]),p.fn.extend({text:function(a){return p.access(this,function(a){return a===b?p.text(this):this.empty().append((this[0]&&this[0].ownerDocument||e).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(p.isFunction(a))return this.each(function(b){p(this).wrapAll(a.call(this,b))});if(this[0]){var b=p(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return p.isFunction(a)?this.each(function(b){p(this).wrapInner(a.call(this,b))}):this.each(function(){var b=p(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=p.isFunction(a);return this.each(function(c){p(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){p.nodeName(this,"body")||p(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(a,this.firstChild)})},before:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(a,this),"before",this.selector)}},after:function(){if(!bh(this[0]))return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=p.clean(arguments);return this.pushStack(p.merge(this,a),"after",this.selector)}},remove:function(a,b){var c,d=0;for(;(c=this[d])!=null;d++)if(!a||p.filter(a,[c]).length)!b&&c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),p.cleanData([c])),c.parentNode&&c.parentNode.removeChild(c);return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){a.nodeType===1&&p.cleanData(a.getElementsByTagName("*"));while(a.firstChild)a.removeChild(a.firstChild)}return this},clone:function(a,b){return a=a==null?!1:a,b=b==null?a:b,this.map(function(){return p.clone(this,a,b)})},html:function(a){return p.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(bm,""):b;if(typeof a=="string"&&!bs.test(a)&&(p.support.htmlSerialize||!bu.test(a))&&(p.support.leadingWhitespace||!bn.test(a))&&!bz[(bp.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(bo,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(p.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(f){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){return bh(this[0])?this.length?this.pushStack(p(p.isFunction(a)?a():a),"replaceWith",a):this:p.isFunction(a)?this.each(function(b){var c=p(this),d=c.html();c.replaceWith(a.call(this,b,d))}):(typeof a!="string"&&(a=p(a).detach()),this.each(function(){var b=this.nextSibling,c=this.parentNode;p(this).remove(),b?p(b).before(a):p(c).append(a)}))},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){a=[].concat.apply([],a);var e,f,g,h,i=0,j=a[0],k=[],l=this.length;if(!p.support.checkClone&&l>1&&typeof j=="string"&&bw.test(j))return this.each(function(){p(this).domManip(a,c,d)});if(p.isFunction(j))return this.each(function(e){var f=p(this);a[0]=j.call(this,e,c?f.html():b),f.domManip(a,c,d)});if(this[0]){e=p.buildFragment(a,this,k),g=e.fragment,f=g.firstChild,g.childNodes.length===1&&(g=f);if(f){c=c&&p.nodeName(f,"tr");for(h=e.cacheable||l-1;i<l;i++)d.call(c&&p.nodeName(this[i],"table")?bC(this[i],"tbody"):this[i],i===h?g:p.clone(g,!0,!0))}g=f=null,k.length&&p.each(k,function(a,b){b.src?p.ajax?p.ajax({url:b.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):p.error("no ajax"):p.globalEval((b.text||b.textContent||b.innerHTML||"").replace(by,"")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),p.buildFragment=function(a,c,d){var f,g,h,i=a[0];return c=c||e,c=(c[0]||c).ownerDocument||c[0]||c,typeof c.createDocumentFragment=="undefined"&&(c=e),a.length===1&&typeof i=="string"&&i.length<512&&c===e&&i.charAt(0)==="<"&&!bt.test(i)&&(p.support.checkClone||!bw.test(i))&&(p.support.html5Clone||!bu.test(i))&&(g=!0,f=p.fragments[i],h=f!==b),f||(f=c.createDocumentFragment(),p.clean(a,c,f,d),g&&(p.fragments[i]=h&&f)),{fragment:f,cacheable:g}},p.fragments={},p.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){p.fn[a]=function(c){var d,e=0,f=[],g=p(c),h=g.length,i=this.length===1&&this[0].parentNode;if((i==null||i&&i.nodeType===11&&i.childNodes.length===1)&&h===1)return g[b](this[0]),this;for(;e<h;e++)d=(e>0?this.clone(!0):this).get(),p(g[e])[b](d),f=f.concat(d);return this.pushStack(f,a,g.selector)}}),p.extend({clone:function(a,b,c){var d,e,f,g;p.support.html5Clone||p.isXMLDoc(a)||!bu.test("<"+a.nodeName+">")?g=a.cloneNode(!0):(bB.innerHTML=a.outerHTML,bB.removeChild(g=bB.firstChild));if((!p.support.noCloneEvent||!p.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!p.isXMLDoc(a)){bE(a,g),d=bF(a),e=bF(g);for(f=0;d[f];++f)e[f]&&bE(d[f],e[f])}if(b){bD(a,g);if(c){d=bF(a),e=bF(g);for(f=0;d[f];++f)bD(d[f],e[f])}}return d=e=null,g},clean:function(a,b,c,d){var f,g,h,i,j,k,l,m,n,o,q,r,s=0,t=[];if(!b||typeof b.createDocumentFragment=="undefined")b=e;for(g=b===e&&bA;(h=a[s])!=null;s++){typeof h=="number"&&(h+="");if(!h)continue;if(typeof h=="string")if(!br.test(h))h=b.createTextNode(h);else{g=g||bk(b),l=l||g.appendChild(b.createElement("div")),h=h.replace(bo,"<$1></$2>"),i=(bp.exec(h)||["",""])[1].toLowerCase(),j=bz[i]||bz._default,k=j[0],l.innerHTML=j[1]+h+j[2];while(k--)l=l.lastChild;if(!p.support.tbody){m=bq.test(h),n=i==="table"&&!m?l.firstChild&&l.firstChild.childNodes:j[1]==="<table>"&&!m?l.childNodes:[];for(f=n.length-1;f>=0;--f)p.nodeName(n[f],"tbody")&&!n[f].childNodes.length&&n[f].parentNode.removeChild(n[f])}!p.support.leadingWhitespace&&bn.test(h)&&l.insertBefore(b.createTextNode(bn.exec(h)[0]),l.firstChild),h=l.childNodes,l=g.lastChild}h.nodeType?t.push(h):t=p.merge(t,h)}l&&(g.removeChild(l),h=l=g=null);if(!p.support.appendChecked)for(s=0;(h=t[s])!=null;s++)p.nodeName(h,"input")?bG(h):typeof h.getElementsByTagName!="undefined"&&p.grep(h.getElementsByTagName("input"),bG);if(c){q=function(a){if(!a.type||bx.test(a.type))return d?d.push(a.parentNode?a.parentNode.removeChild(a):a):c.appendChild(a)};for(s=0;(h=t[s])!=null;s++)if(!p.nodeName(h,"script")||!q(h))c.appendChild(h),typeof h.getElementsByTagName!="undefined"&&(r=p.grep(p.merge([],h.getElementsByTagName("script")),q),t.splice.apply(t,[s+1,0].concat(r)),s+=r.length)}return t},cleanData:function(a,b){var c,d,e,f,g=0,h=p.expando,i=p.cache,j=p.support.deleteExpando,k=p.event.special;for(;(e=a[g])!=null;g++)if(b||p.acceptData(e)){d=e[h],c=d&&i[d];if(c){if(c.events)for(f in c.events)k[f]?p.event.remove(e,f):p.removeEvent(e,f,c.handle);i[d]&&(delete i[d],j?delete e[h]:e.removeAttribute?e.removeAttribute(h):e[h]=null,p.deletedIds.push(d))}}}}),function(){var a,b;p.uaMatch=function(a){a=a.toLowerCase();var b=/(chrome)[ \/]([\w.]+)/.exec(a)||/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||a.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},a=p.uaMatch(g.userAgent),b={},a.browser&&(b[a.browser]=!0,b.version=a.version),b.webkit&&(b.safari=!0),p.browser=b,p.sub=function(){function a(b,c){return new a.fn.init(b,c)}p.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function c(c,d){return d&&d instanceof p&&!(d instanceof a)&&(d=a(d)),p.fn.init.call(this,c,d,b)},a.fn.init.prototype=a.fn;var b=a(e);return a}}();var bH,bI,bJ,bK=/alpha\([^)]*\)/i,bL=/opacity=([^)]*)/,bM=/^(top|right|bottom|left)$/,bN=/^margin/,bO=new RegExp("^("+q+")(.*)$","i"),bP=new RegExp("^("+q+")(?!px)[a-z%]+$","i"),bQ=new RegExp("^([-+])=("+q+")","i"),bR={},bS={position:"absolute",visibility:"hidden",display:"block"},bT={letterSpacing:0,fontWeight:400,lineHeight:1},bU=["Top","Right","Bottom","Left"],bV=["Webkit","O","Moz","ms"],bW=p.fn.toggle;p.fn.extend({css:function(a,c){return p.access(this,function(a,c,d){return d!==b?p.style(a,c,d):p.css(a,c)},a,c,arguments.length>1)},show:function(){return bZ(this,!0)},hide:function(){return bZ(this)},toggle:function(a,b){var c=typeof a=="boolean";return p.isFunction(a)&&p.isFunction(b)?bW.apply(this,arguments):this.each(function(){(c?a:bY(this))?p(this).show():p(this).hide()})}}),p.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bH(a,"opacity");return c===""?"1":c}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":p.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!a||a.nodeType===3||a.nodeType===8||!a.style)return;var f,g,h,i=p.camelCase(c),j=a.style;c=p.cssProps[i]||(p.cssProps[i]=bX(j,i)),h=p.cssHooks[c]||p.cssHooks[i];if(d===b)return h&&"get"in h&&(f=h.get(a,!1,e))!==b?f:j[c];g=typeof d,g==="string"&&(f=bQ.exec(d))&&(d=(f[1]+1)*f[2]+parseFloat(p.css(a,c)),g="number");if(d==null||g==="number"&&isNaN(d))return;g==="number"&&!p.cssNumber[i]&&(d+="px");if(!h||!("set"in h)||(d=h.set(a,d,e))!==b)try{j[c]=d}catch(k){}},css:function(a,c,d,e){var f,g,h,i=p.camelCase(c);return c=p.cssProps[i]||(p.cssProps[i]=bX(a.style,i)),h=p.cssHooks[c]||p.cssHooks[i],h&&"get"in h&&(f=h.get(a,!0,e)),f===b&&(f=bH(a,c)),f==="normal"&&c in bT&&(f=bT[c]),d||e!==b?(g=parseFloat(f),d||p.isNumeric(g)?g||0:f):f},swap:function(a,b,c){var d,e,f={};for(e in b)f[e]=a.style[e],a.style[e]=b[e];d=c.call(a);for(e in b)a.style[e]=f[e];return d}}),a.getComputedStyle?bH=function(a,b){var c,d,e,f,g=getComputedStyle(a,null),h=a.style;return g&&(c=g[b],c===""&&!p.contains(a.ownerDocument.documentElement,a)&&(c=p.style(a,b)),bP.test(c)&&bN.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=c,c=g.width,h.width=d,h.minWidth=e,h.maxWidth=f)),c}:e.documentElement.currentStyle&&(bH=function(a,b){var c,d,e=a.currentStyle&&a.currentStyle[b],f=a.style;return e==null&&f&&f[b]&&(e=f[b]),bP.test(e)&&!bM.test(b)&&(c=f.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":e,e=f.pixelLeft+"px",f.left=c,d&&(a.runtimeStyle.left=d)),e===""?"auto":e}),p.each(["height","width"],function(a,b){p.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0||bH(a,"display")!=="none"?ca(a,b,d):p.swap(a,bS,function(){return ca(a,b,d)})},set:function(a,c,d){return b$(a,c,d?b_(a,b,d,p.support.boxSizing&&p.css(a,"boxSizing")==="border-box"):0)}}}),p.support.opacity||(p.cssHooks.opacity={get:function(a,b){return bL.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=p.isNumeric(b)?"alpha(opacity="+b*100+")":"",f=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&p.trim(f.replace(bK,""))===""&&c.removeAttribute){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bK.test(f)?f.replace(bK,e):f+" "+e}}),p(function(){p.support.reliableMarginRight||(p.cssHooks.marginRight={get:function(a,b){return p.swap(a,{display:"inline-block"},function(){if(b)return bH(a,"marginRight")})}}),!p.support.pixelPosition&&p.fn.position&&p.each(["top","left"],function(a,b){p.cssHooks[b]={get:function(a,c){if(c){var d=bH(a,b);return bP.test(d)?p(a).position()[b]+"px":d}}}})}),p.expr&&p.expr.filters&&(p.expr.filters.hidden=function(a){return a.offsetWidth===0&&a.offsetHeight===0||!p.support.reliableHiddenOffsets&&(a.style&&a.style.display||bH(a,"display"))==="none"},p.expr.filters.visible=function(a){return!p.expr.filters.hidden(a)}),p.each({margin:"",padding:"",border:"Width"},function(a,b){p.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bU[d]+b]=e[d]||e[d-2]||e[0];return f}},bN.test(a)||(p.cssHooks[a+b].set=b$)});var cc=/%20/g,cd=/\[\]$/,ce=/\r?\n/g,cf=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,cg=/^(?:select|textarea)/i;p.fn.extend({serialize:function(){return p.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?p.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||cg.test(this.nodeName)||cf.test(this.type))}).map(function(a,b){var c=p(this).val();return c==null?null:p.isArray(c)?p.map(c,function(a,c){return{name:b.name,value:a.replace(ce,"\r\n")}}):{name:b.name,value:c.replace(ce,"\r\n")}}).get()}}),p.param=function(a,c){var d,e=[],f=function(a,b){b=p.isFunction(b)?b():b==null?"":b,e[e.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=p.ajaxSettings&&p.ajaxSettings.traditional);if(p.isArray(a)||a.jquery&&!p.isPlainObject(a))p.each(a,function(){f(this.name,this.value)});else for(d in a)ch(d,a[d],c,f);return e.join("&").replace(cc,"+")};var ci,cj,ck=/#.*$/,cl=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,cm=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,cn=/^(?:GET|HEAD)$/,co=/^\/\//,cp=/\?/,cq=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,cr=/([?&])_=[^&]*/,cs=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,ct=p.fn.load,cu={},cv={},cw=["*/"]+["*"];try{ci=f.href}catch(cx){ci=e.createElement("a"),ci.href="",ci=ci.href}cj=cs.exec(ci.toLowerCase())||[],p.fn.load=function(a,c,d){if(typeof a!="string"&&ct)return ct.apply(this,arguments);if(!this.length)return this;var e,f,g,h=this,i=a.indexOf(" ");return i>=0&&(e=a.slice(i,a.length),a=a.slice(0,i)),p.isFunction(c)?(d=c,c=b):typeof c=="object"&&(f="POST"),p.ajax({url:a,type:f,dataType:"html",data:c,complete:function(a,b){d&&h.each(d,g||[a.responseText,b,a])}}).done(function(a){g=arguments,h.html(e?p("<div>").append(a.replace(cq,"")).find(e):a)}),this},p.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){p.fn[b]=function(a){return this.on(b,a)}}),p.each(["get","post"],function(a,c){p[c]=function(a,d,e,f){return p.isFunction(d)&&(f=f||e,e=d,d=b),p.ajax({type:c,url:a,data:d,success:e,dataType:f})}}),p.extend({getScript:function(a,c){return p.get(a,b,c,"script")},getJSON:function(a,b,c){return p.get(a,b,c,"json")},ajaxSetup:function(a,b){return b?cA(a,p.ajaxSettings):(b=a,a=p.ajaxSettings),cA(a,b),a},ajaxSettings:{url:ci,isLocal:cm.test(cj[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":cw},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":p.parseJSON,"text xml":p.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:cy(cu),ajaxTransport:cy(cv),ajax:function(a,c){function y(a,c,f,i){var k,s,t,u,w,y=c;if(v===2)return;v=2,h&&clearTimeout(h),g=b,e=i||"",x.readyState=a>0?4:0,f&&(u=cB(l,x,f));if(a>=200&&a<300||a===304)l.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(p.lastModified[d]=w),w=x.getResponseHeader("Etag"),w&&(p.etag[d]=w)),a===304?(y="notmodified",k=!0):(k=cC(l,u),y=k.state,s=k.data,t=k.error,k=!t);else{t=y;if(!y||a)y="error",a<0&&(a=0)}x.status=a,x.statusText=""+(c||y),k?o.resolveWith(m,[s,y,x]):o.rejectWith(m,[x,y,t]),x.statusCode(r),r=b,j&&n.trigger("ajax"+(k?"Success":"Error"),[x,l,k?s:t]),q.fireWith(m,[x,y]),j&&(n.trigger("ajaxComplete",[x,l]),--p.active||p.event.trigger("ajaxStop"))}typeof a=="object"&&(c=a,a=b),c=c||{};var d,e,f,g,h,i,j,k,l=p.ajaxSetup({},c),m=l.context||l,n=m!==l&&(m.nodeType||m instanceof p)?p(m):p.event,o=p.Deferred(),q=p.Callbacks("once memory"),r=l.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,setRequestHeader:function(a,b){if(!v){var c=a.toLowerCase();a=u[c]=u[c]||a,t[a]=b}return this},getAllResponseHeaders:function(){return v===2?e:null},getResponseHeader:function(a){var c;if(v===2){if(!f){f={};while(c=cl.exec(e))f[c[1].toLowerCase()]=c[2]}c=f[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){return v||(l.mimeType=a),this},abort:function(a){return a=a||w,g&&g.abort(a),y(0,a),this}};o.promise(x),x.success=x.done,x.error=x.fail,x.complete=q.add,x.statusCode=function(a){if(a){var b;if(v<2)for(b in a)r[b]=[r[b],a[b]];else b=a[x.status],x.always(b)}return this},l.url=((a||l.url)+"").replace(ck,"").replace(co,cj[1]+"//"),l.dataTypes=p.trim(l.dataType||"*").toLowerCase().split(s),l.crossDomain==null&&(i=cs.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]==cj[1]&&i[2]==cj[2]&&(i[3]||(i[1]==="http:"?80:443))==(cj[3]||(cj[1]==="http:"?80:443)))),l.data&&l.processData&&typeof l.data!="string"&&(l.data=p.param(l.data,l.traditional)),cz(cu,l,c,x);if(v===2)return x;j=l.global,l.type=l.type.toUpperCase(),l.hasContent=!cn.test(l.type),j&&p.active++===0&&p.event.trigger("ajaxStart");if(!l.hasContent){l.data&&(l.url+=(cp.test(l.url)?"&":"?")+l.data,delete l.data),d=l.url;if(l.cache===!1){var z=p.now(),A=l.url.replace(cr,"$1_="+z);l.url=A+(A===l.url?(cp.test(l.url)?"&":"?")+"_="+z:"")}}(l.data&&l.hasContent&&l.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",l.contentType),l.ifModified&&(d=d||l.url,p.lastModified[d]&&x.setRequestHeader("If-Modified-Since",p.lastModified[d]),p.etag[d]&&x.setRequestHeader("If-None-Match",p.etag[d])),x.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+(l.dataTypes[0]!=="*"?", "+cw+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)x.setRequestHeader(k,l.headers[k]);if(!l.beforeSend||l.beforeSend.call(m,x,l)!==!1&&v!==2){w="abort";for(k in{success:1,error:1,complete:1})x[k](l[k]);g=cz(cv,l,c,x);if(!g)y(-1,"No Transport");else{x.readyState=1,j&&n.trigger("ajaxSend",[x,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){x.abort("timeout")},l.timeout));try{v=1,g.send(t,y)}catch(B){if(v<2)y(-1,B);else throw B}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var cD=[],cE=/\?/,cF=/(=)\?(?=&|$)|\?\?/,cG=p.now();p.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=cD.pop()||p.expando+"_"+cG++;return this[a]=!0,a}}),p.ajaxPrefilter("json jsonp",function(c,d,e){var f,g,h,i=c.data,j=c.url,k=c.jsonp!==!1,l=k&&cF.test(j),m=k&&!l&&typeof i=="string"&&!(c.contentType||"").indexOf("application/x-www-form-urlencoded")&&cF.test(i);if(c.dataTypes[0]==="jsonp"||l||m)return f=c.jsonpCallback=p.isFunction(c.jsonpCallback)?c.jsonpCallback():c.jsonpCallback,g=a[f],l?c.url=j.replace(cF,"$1"+f):m?c.data=i.replace(cF,"$1"+f):k&&(c.url+=(cE.test(j)?"&":"?")+c.jsonp+"="+f),c.converters["script json"]=function(){return h||p.error(f+" was not called"),h[0]},c.dataTypes[0]="json",a[f]=function(){h=arguments},e.always(function(){a[f]=g,c[f]&&(c.jsonpCallback=d.jsonpCallback,cD.push(f)),h&&p.isFunction(g)&&g(h[0]),h=g=b}),"script"}),p.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){return p.globalEval(a),a}}}),p.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),p.ajaxTransport("script",function(a){if(a.crossDomain){var c,d=e.head||e.getElementsByTagName("head")[0]||e.documentElement;return{send:function(f,g){c=e.createElement("script"),c.async="async",a.scriptCharset&&(c.charset=a.scriptCharset),c.src=a.url,c.onload=c.onreadystatechange=function(a,e){if(e||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,d&&c.parentNode&&d.removeChild(c),c=b,e||g(200,"success")},d.insertBefore(c,d.firstChild)},abort:function(){c&&c.onload(0,1)}}}});var cH,cI=a.ActiveXObject?function(){for(var a in cH)cH[a](0,1)}:!1,cJ=0;p.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&cK()||cL()}:cK,function(a){p.extend(p.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(p.ajaxSettings.xhr()),p.support.ajax&&p.ajaxTransport(function(c){if(!c.crossDomain||p.support.cors){var d;return{send:function(e,f){var g,h,i=c.xhr();c.username?i.open(c.type,c.url,c.async,c.username,c.password):i.open(c.type,c.url,c.async);if(c.xhrFields)for(h in c.xhrFields)i[h]=c.xhrFields[h];c.mimeType&&i.overrideMimeType&&i.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(h in e)i.setRequestHeader(h,e[h])}catch(j){}i.send(c.hasContent&&c.data||null),d=function(a,e){var h,j,k,l,m;try{if(d&&(e||i.readyState===4)){d=b,g&&(i.onreadystatechange=p.noop,cI&&delete cH[g]);if(e)i.readyState!==4&&i.abort();else{h=i.status,k=i.getAllResponseHeaders(),l={},m=i.responseXML,m&&m.documentElement&&(l.xml=m);try{l.text=i.responseText}catch(a){}try{j=i.statusText}catch(n){j=""}!h&&c.isLocal&&!c.crossDomain?h=l.text?200:404:h===1223&&(h=204)}}}catch(o){e||f(-1,o)}l&&f(h,j,l,k)},c.async?i.readyState===4?setTimeout(d,0):(g=++cJ,cI&&(cH||(cH={},p(a).unload(cI)),cH[g]=d),i.onreadystatechange=d):d()},abort:function(){d&&d(0,1)}}}});var cM,cN,cO=/^(?:toggle|show|hide)$/,cP=new RegExp("^(?:([-+])=|)("+q+")([a-z%]*)$","i"),cQ=/queueHooks$/,cR=[cX],cS={"*":[function(a,b){var c,d,e,f=this.createTween(a,b),g=cP.exec(b),h=f.cur(),i=+h||0,j=1;if(g){c=+g[2],d=g[3]||(p.cssNumber[a]?"":"px");if(d!=="px"&&i){i=p.css(f.elem,a,!0)||c||1;do e=j=j||".5",i=i/j,p.style(f.elem,a,i+d),j=f.cur()/h;while(j!==1&&j!==e)}f.unit=d,f.start=i,f.end=g[1]?i+(g[1]+1)*c:c}return f}]};p.Animation=p.extend(cV,{tweener:function(a,b){p.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");var c,d=0,e=a.length;for(;d<e;d++)c=a[d],cS[c]=cS[c]||[],cS[c].unshift(b)},prefilter:function(a,b){b?cR.unshift(a):cR.push(a)}}),p.Tween=cY,cY.prototype={constructor:cY,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(p.cssNumber[c]?"":"px")},cur:function(){var a=cY.propHooks[this.prop];return a&&a.get?a.get(this):cY.propHooks._default.get(this)},run:function(a){var b,c=cY.propHooks[this.prop];return this.pos=b=p.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration),this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):cY.propHooks._default.set(this),this}},cY.prototype.init.prototype=cY.prototype,cY.propHooks={_default:{get:function(a){var b;return a.elem[a.prop]==null||!!a.elem.style&&a.elem.style[a.prop]!=null?(b=p.css(a.elem,a.prop,!1,""),!b||b==="auto"?0:b):a.elem[a.prop]},set:function(a){p.fx.step[a.prop]?p.fx.step[a.prop](a):a.elem.style&&(a.elem.style[p.cssProps[a.prop]]!=null||p.cssHooks[a.prop])?p.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},cY.propHooks.scrollTop=cY.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},p.each(["toggle","show","hide"],function(a,b){var c=p.fn[b];p.fn[b]=function(d,e,f){return d==null||typeof d=="boolean"||!a&&p.isFunction(d)&&p.isFunction(e)?c.apply(this,arguments):this.animate(cZ(b,!0),d,e,f)}}),p.fn.extend({fadeTo:function(a,b,c,d){return this.filter(bY).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=p.isEmptyObject(a),f=p.speed(b,c,d),g=function(){var b=cV(this,p.extend({},a),f);e&&b.stop(!0)};return e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,c,d){var e=function(a){var b=a.stop;delete a.stop,b(d)};return typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,c=a!=null&&a+"queueHooks",f=p.timers,g=p._data(this);if(c)g[c]&&g[c].stop&&e(g[c]);else for(c in g)g[c]&&g[c].stop&&cQ.test(c)&&e(g[c]);for(c=f.length;c--;)f[c].elem===this&&(a==null||f[c].queue===a)&&(f[c].anim.stop(d),b=!1,f.splice(c,1));(b||!d)&&p.dequeue(this,a)})}}),p.each({slideDown:cZ("show"),slideUp:cZ("hide"),slideToggle:cZ("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){p.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),p.speed=function(a,b,c){var d=a&&typeof a=="object"?p.extend({},a):{complete:c||!c&&b||p.isFunction(a)&&a,duration:a,easing:c&&b||b&&!p.isFunction(b)&&b};d.duration=p.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in p.fx.speeds?p.fx.speeds[d.duration]:p.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";return d.old=d.complete,d.complete=function(){p.isFunction(d.old)&&d.old.call(this),d.queue&&p.dequeue(this,d.queue)},d},p.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},p.timers=[],p.fx=cY.prototype.init,p.fx.tick=function(){var a,b=p.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||p.fx.stop()},p.fx.timer=function(a){a()&&p.timers.push(a)&&!cN&&(cN=setInterval(p.fx.tick,p.fx.interval))},p.fx.interval=13,p.fx.stop=function(){clearInterval(cN),cN=null},p.fx.speeds={slow:600,fast:200,_default:400},p.fx.step={},p.expr&&p.expr.filters&&(p.expr.filters.animated=function(a){return p.grep(p.timers,function(b){return a===b.elem}).length});var c$=/^(?:body|html)$/i;p.fn.offset=function(a){if(arguments.length)return a===b?this:this.each(function(b){p.offset.setOffset(this,a,b)});var c,d,e,f,g,h,i,j,k,l,m=this[0],n=m&&m.ownerDocument;if(!n)return;return(e=n.body)===m?p.offset.bodyOffset(m):(d=n.documentElement,p.contains(d,m)?(c=m.getBoundingClientRect(),f=c_(n),g=d.clientTop||e.clientTop||0,h=d.clientLeft||e.clientLeft||0,i=f.pageYOffset||d.scrollTop,j=f.pageXOffset||d.scrollLeft,k=c.top+i-g,l=c.left+j-h,{top:k,left:l}):{top:0,left:0})},p.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;return p.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(p.css(a,"marginTop"))||0,c+=parseFloat(p.css(a,"marginLeft"))||0),{top:b,left:c}},setOffset:function(a,b,c){var d=p.css(a,"position");d==="static"&&(a.style.position="relative");var e=p(a),f=e.offset(),g=p.css(a,"top"),h=p.css(a,"left"),i=(d==="absolute"||d==="fixed")&&p.inArray("auto",[g,h])>-1,j={},k={},l,m;i?(k=e.position(),l=k.top,m=k.left):(l=parseFloat(g)||0,m=parseFloat(h)||0),p.isFunction(b)&&(b=b.call(a,c,f)),b.top!=null&&(j.top=b.top-f.top+l),b.left!=null&&(j.left=b.left-f.left+m),"using"in b?b.using.call(a,j):e.css(j)}},p.fn.extend({position:function(){if(!this[0])return;var a=this[0],b=this.offsetParent(),c=this.offset(),d=c$.test(b[0].nodeName)?{top:0,left:0}:b.offset();return c.top-=parseFloat(p.css(a,"marginTop"))||0,c.left-=parseFloat(p.css(a,"marginLeft"))||0,d.top+=parseFloat(p.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(p.css(b[0],"borderLeftWidth"))||0,{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||e.body;while(a&&!c$.test(a.nodeName)&&p.css(a,"position")==="static")a=a.offsetParent;return a||e.body})}}),p.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);p.fn[a]=function(e){return p.access(this,function(a,e,f){var g=c_(a);if(f===b)return g?c in g?g[c]:g.document.documentElement[e]:a[e];g?g.scrollTo(d?p(g).scrollLeft():f,d?f:p(g).scrollTop()):a[e]=f},a,e,arguments.length,null)}}),p.each({Height:"height",Width:"width"},function(a,c){p.each({padding:"inner"+a,content:c,"":"outer"+a},function(d,e){p.fn[e]=function(e,f){var g=arguments.length&&(d||typeof e!="boolean"),h=d||(e===!0||f===!0?"margin":"border");return p.access(this,function(c,d,e){var f;return p.isWindow(c)?c.document.documentElement["client"+a]:c.nodeType===9?(f=c.documentElement,Math.max(c.body["scroll"+a],f["scroll"+a],c.body["offset"+a],f["offset"+a],f["client"+a])):e===b?p.css(c,d,e,h):p.style(c,d,e,h)},c,g?e:b,g)}})}),a.jQuery=a.$=p,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return p})})(window);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.ba-bbq.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.ba-bbq.min.js
new file mode 100644 (file)
index 0000000..aa14db8
--- /dev/null
@@ -0,0 +1,18 @@
+/*\r
+ * jQuery BBQ: Back Button & Query Library - v1.2.1 - 2/17/2010\r
+ * http://benalman.com/projects/jquery-bbq-plugin/\r
+ * \r
+ * Copyright (c) 2010 "Cowboy" Ben Alman\r
+ * Dual licensed under the MIT and GPL licenses.\r
+ * http://benalman.com/about/license/\r
+ */\r
+(function($,p){var i,m=Array.prototype.slice,r=decodeURIComponent,a=$.param,c,l,v,b=$.bbq=$.bbq||{},q,u,j,e=$.event.special,d="hashchange",A="querystring",D="fragment",y="elemUrlAttr",g="location",k="href",t="src",x=/^.*\?|#.*$/g,w=/^.*\#/,h,C={};function E(F){return typeof F==="string"}function B(G){var F=m.call(arguments,1);return function(){return G.apply(this,F.concat(m.call(arguments)))}}function n(F){return F.replace(/^[^#]*#?(.*)$/,"$1")}function o(F){return F.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function f(H,M,F,I,G){var O,L,K,N,J;if(I!==i){K=F.match(H?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/);J=K[3]||"";if(G===2&&E(I)){L=I.replace(H?w:x,"")}else{N=l(K[2]);I=E(I)?l[H?D:A](I):I;L=G===2?I:G===1?$.extend({},I,N):$.extend({},N,I);L=a(L);if(H){L=L.replace(h,r)}}O=K[1]+(H?"#":L||!K[1]?"?":"")+L+J}else{O=M(F!==i?F:p[g][k])}return O}a[A]=B(f,0,o);a[D]=c=B(f,1,n);c.noEscape=function(G){G=G||"";var F=$.map(G.split(""),encodeURIComponent);h=new RegExp(F.join("|"),"g")};c.noEscape(",/");$.deparam=l=function(I,F){var H={},G={"true":!0,"false":!1,"null":null};$.each(I.replace(/\+/g," ").split("&"),function(L,Q){var K=Q.split("="),P=r(K[0]),J,O=H,M=0,R=P.split("]["),N=R.length-1;if(/\[/.test(R[0])&&/\]$/.test(R[N])){R[N]=R[N].replace(/\]$/,"");R=R.shift().split("[").concat(R);N=R.length-1}else{N=0}if(K.length===2){J=r(K[1]);if(F){J=J&&!isNaN(J)?+J:J==="undefined"?i:G[J]!==i?G[J]:J}if(N){for(;M<=N;M++){P=R[M]===""?O.length:R[M];O=O[P]=M<N?O[P]||(R[M+1]&&isNaN(R[M+1])?{}:[]):J}}else{if($.isArray(H[P])){H[P].push(J)}else{if(H[P]!==i){H[P]=[H[P],J]}else{H[P]=J}}}}else{if(P){H[P]=F?i:""}}});return H};function z(H,F,G){if(F===i||typeof F==="boolean"){G=F;F=a[H?D:A]()}else{F=E(F)?F.replace(H?w:x,""):F}return l(F,G)}l[A]=B(z,0);l[D]=v=B(z,1);$[y]||($[y]=function(F){return $.extend(C,F)})({a:k,base:k,iframe:t,img:t,input:t,form:"action",link:k,script:t});j=$[y];function s(I,G,H,F){if(!E(H)&&typeof H!=="object"){F=H;H=G;G=i}return this.each(function(){var L=$(this),J=G||j()[(this.nodeName||"").toLowerCase()]||"",K=J&&L.attr(J)||"";L.attr(J,a[I](K,H,F))})}$.fn[A]=B(s,A);$.fn[D]=B(s,D);b.pushState=q=function(I,F){if(E(I)&&/^#/.test(I)&&F===i){F=2}var H=I!==i,G=c(p[g][k],H?I:{},H?F:2);p[g][k]=G+(/#/.test(G)?"":"#")};b.getState=u=function(F,G){return F===i||typeof F==="boolean"?v(F):v(G)[F]};b.removeState=function(F){var G={};if(F!==i){G=u();$.each($.isArray(F)?F:arguments,function(I,H){delete G[H]})}q(G,2)};e[d]=$.extend(e[d],{add:function(F){var H;function G(J){var I=J[D]=c();J.getState=function(K,L){return K===i||typeof K==="boolean"?l(I,K):l(I,L)[K]};H.apply(this,arguments)}if($.isFunction(F)){H=F;return G}else{H=F.handler;F.handler=G}}})})(jQuery,this);\r
+/*\r
+ * jQuery hashchange event - v1.2 - 2/11/2010\r
+ * http://benalman.com/projects/jquery-hashchange-plugin/\r
+ * \r
+ * Copyright (c) 2010 "Cowboy" Ben Alman\r
+ * Dual licensed under the MIT and GPL licenses.\r
+ * http://benalman.com/about/license/\r
+ */\r
+(function($,i,b){var j,k=$.event.special,c="location",d="hashchange",l="href",f=$.browser,g=document.documentMode,h=f.msie&&(g===b||g<8),e="on"+d in i&&!h;function a(m){m=m||i[c][l];return m.replace(/^[^#]*#?(.*)$/,"$1")}$[d+"Delay"]=100;k[d]=$.extend(k[d],{setup:function(){if(e){return false}$(j.start)},teardown:function(){if(e){return false}$(j.stop)}});j=(function(){var m={},r,n,o,q;function p(){o=q=function(s){return s};if(h){n=$('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow;q=function(){return a(n.document[c][l])};o=function(u,s){if(u!==s){var t=n.document;t.open().close();t[c].hash="#"+u}};o(a())}}m.start=function(){if(r){return}var t=a();o||p();(function s(){var v=a(),u=q(t);if(v!==t){o(t=v,u);$(i).trigger(d)}else{if(u!==t){i[c][l]=i[c][l].replace(/#.*/,"")+"#"+u}}r=setTimeout(s,$[d+"Delay"])})()};m.stop=function(){if(!n){r&&clearTimeout(r);r=0}};return m})()})(jQuery,this);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.slideto.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.slideto.min.js
new file mode 100644 (file)
index 0000000..193334e
--- /dev/null
@@ -0,0 +1 @@
+(function(b){b.fn.slideto=function(a){a=b.extend({slide_duration:"slow",highlight_duration:3E3,highlight:true,highlight_color:"#FFFF99"},a);return this.each(function(){obj=b(this);b("body").animate({scrollTop:obj.offset().top},a.slide_duration,function(){a.highlight&&b.ui.version&&obj.effect("highlight",{color:a.highlight_color},a.highlight_duration)})})}})(jQuery);\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.wiggle.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.wiggle.min.js
new file mode 100644 (file)
index 0000000..933880f
--- /dev/null
@@ -0,0 +1,8 @@
+/*\r
+jQuery Wiggle\r
+Author: WonderGroup, Jordan Thomas\r
+URL: http://labs.wondergroup.com/demos/mini-ui/index.html\r
+License: MIT (http://en.wikipedia.org/wiki/MIT_License)\r
+*/\r
+jQuery.fn.wiggle=function(o){var d={speed:50,wiggles:3,travel:5,callback:null};var o=jQuery.extend(d,o);return this.each(function(){var cache=this;var wrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");var calls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}\r
+if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/js-yaml.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/js-yaml.min.js
new file mode 100644 (file)
index 0000000..3a51fc2
--- /dev/null
@@ -0,0 +1,3 @@
+/* js-yaml 3.4.6 https://github.com/nodeca/js-yaml */\r
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.jsyaml=t()}}(function(){var t;return function e(t,n,i){function r(a,s){if(!n[a]){if(!t[a]){var c="function"==typeof require&&require;if(!s&&c)return c(a,!0);if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return r(n?n:e)},l,l.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<i.length;a++)r(i[a]);return r}({1:[function(t,e,n){"use strict";function i(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}var r=t("./js-yaml/loader"),o=t("./js-yaml/dumper");e.exports.Type=t("./js-yaml/type"),e.exports.Schema=t("./js-yaml/schema"),e.exports.FAILSAFE_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.JSON_SCHEMA=t("./js-yaml/schema/json"),e.exports.CORE_SCHEMA=t("./js-yaml/schema/core"),e.exports.DEFAULT_SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_FULL_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=t("./js-yaml/exception"),e.exports.MINIMAL_SCHEMA=t("./js-yaml/schema/failsafe"),e.exports.SAFE_SCHEMA=t("./js-yaml/schema/default_safe"),e.exports.DEFAULT_SCHEMA=t("./js-yaml/schema/default_full"),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":3,"./js-yaml/exception":4,"./js-yaml/loader":5,"./js-yaml/schema":7,"./js-yaml/schema/core":8,"./js-yaml/schema/default_full":9,"./js-yaml/schema/default_safe":10,"./js-yaml/schema/failsafe":11,"./js-yaml/schema/json":12,"./js-yaml/type":13}],2:[function(t,e,n){"use strict";function i(t){return"undefined"==typeof t||null===t}function r(t){return"object"==typeof t&&null!==t}function o(t){return Array.isArray(t)?t:i(t)?[]:[t]}function a(t,e){var n,i,r,o;if(e)for(o=Object.keys(e),n=0,i=o.length;i>n;n+=1)r=o[n],t[r]=e[r];return t}function s(t,e){var n,i="";for(n=0;e>n;n+=1)i+=t;return i}function c(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}e.exports.isNothing=i,e.exports.isObject=r,e.exports.toArray=o,e.exports.repeat=s,e.exports.isNegativeZero=c,e.exports.extend=a},{}],3:[function(t,e,n){"use strict";function i(t,e){var n,i,r,o,a,s,c;if(null===e)return{};for(n={},i=Object.keys(e),r=0,o=i.length;o>r;r+=1)a=i[r],s=String(e[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),c=t.compiledTypeMap[a],c&&E.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}function r(t){var e,n,i;if(e=t.toString(16).toUpperCase(),255>=t)n="x",i=2;else if(65535>=t)n="u",i=4;else{if(!(4294967295>=t))throw new O("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+j.repeat("0",i-e.length)+e}function o(t){this.schema=t.schema||S,this.indent=Math.max(1,t.indent||2),this.skipInvalid=t.skipInvalid||!1,this.flowLevel=j.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=i(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function a(t,e){for(var n,i=j.repeat(" ",e),r=0,o=-1,a="",s=t.length;s>r;)o=t.indexOf("\n",r),-1===o?(n=t.slice(r),r=s):(n=t.slice(r,o+1),r=o+1),n.length&&"\n"!==n&&(a+=i),a+=n;return a}function s(t,e){return"\n"+j.repeat(" ",t.indent*e)}function c(t,e){var n,i,r;for(n=0,i=t.implicitTypes.length;i>n;n+=1)if(r=t.implicitTypes[n],r.resolve(e))return!0;return!1}function u(t){this.source=t,this.result="",this.checkpoint=0}function l(t,e,n,i){var r,o,s,l,f,m,g,y,v,x,A,b,w,k,C,j,O,S,_,I,E;if(0===e.length)return void(t.dump="''");if(-1!==et.indexOf(e))return void(t.dump="'"+e+"'");for(r=!0,o=e.length?e.charCodeAt(0):0,s=M===o||M===e.charCodeAt(e.length-1),(K===o||W===o||G===o||z===o)&&(r=!1),s?(r=!1,l=!1,f=!1):(l=!i,f=!i),m=!0,g=new u(e),y=!1,v=0,x=0,A=t.indent*n,b=t.lineWidth,-1===b&&(b=9007199254740991),40>A?b-=A:b=40,k=0;k<e.length;k++){if(w=e.charCodeAt(k),r){if(h(w))continue;r=!1}m&&w===P&&(m=!1),C=tt[w],j=d(w),(C||j)&&(w!==N&&w!==D&&w!==P?(l=!1,f=!1):w===N&&(y=!0,m=!1,k>0&&(O=e.charCodeAt(k-1),O===M&&(f=!1,l=!1)),l&&(S=k-v,v=k,S>x&&(x=S))),w!==D&&(m=!1),g.takeUpTo(k),g.escapeChar())}if(r&&c(t,e)&&(r=!1),_="",(l||f)&&(I=0,e.charCodeAt(e.length-1)===N&&(I+=1,e.charCodeAt(e.length-2)===N&&(I+=1)),0===I?_="-":2===I&&(_="+")),f&&b>x&&(l=!1),y||(f=!1),r)t.dump=e;else if(m)t.dump="'"+e+"'";else if(l)E=p(e,b),t.dump=">"+_+"\n"+a(E,A);else if(f)_||(e=e.replace(/\n$/,"")),t.dump="|"+_+"\n"+a(e,A);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),t.dump='"'+g.result+'"'}}function p(t,e){var n,i="",r=0,o=t.length,a=/\n+$/.exec(t);for(a&&(o=a.index+1);o>r;)n=t.indexOf("\n",r),n>o||-1===n?(i&&(i+="\n\n"),i+=f(t.slice(r,o),e),r=o):(i&&(i+="\n\n"),i+=f(t.slice(r,n),e),r=n+1);return a&&"\n"!==a[0]&&(i+=a[0]),i}function f(t,e){if(""===t)return t;for(var n,i,r,o=/[^\s] [^\s]/g,a="",s=0,c=0,u=o.exec(t);u;)n=u.index,n-c>e&&(i=s!==c?s:n,a&&(a+="\n"),r=t.slice(c,i),a+=r,c=i+1),s=n+1,u=o.exec(t);return a&&(a+="\n"),a+=c!==s&&t.length-c>e?t.slice(c,s)+"\n"+t.slice(s+1):t.slice(c)}function h(t){return F!==t&&N!==t&&T!==t&&B!==t&&V!==t&&Z!==t&&J!==t&&X!==t&&U!==t&&Y!==t&&$!==t&&L!==t&&Q!==t&&R!==t&&P!==t&&D!==t&&q!==t&&H!==t&&!tt[t]&&!d(t)}function d(t){return!(t>=32&&126>=t||133===t||t>=160&&55295>=t||t>=57344&&65533>=t||t>=65536&&1114111>=t)}function m(t,e,n){var i,r,o="",a=t.tag;for(i=0,r=n.length;r>i;i+=1)A(t,e,n[i],!1,!1)&&(0!==i&&(o+=", "),o+=t.dump);t.tag=a,t.dump="["+o+"]"}function g(t,e,n,i){var r,o,a="",c=t.tag;for(r=0,o=n.length;o>r;r+=1)A(t,e+1,n[r],!0,!0)&&(i&&0===r||(a+=s(t,e)),a+="- "+t.dump);t.tag=c,t.dump=a||"[]"}function y(t,e,n){var i,r,o,a,s,c="",u=t.tag,l=Object.keys(n);for(i=0,r=l.length;r>i;i+=1)s="",0!==i&&(s+=", "),o=l[i],a=n[o],A(t,e,o,!1,!1)&&(t.dump.length>1024&&(s+="? "),s+=t.dump+": ",A(t,e,a,!1,!1)&&(s+=t.dump,c+=s));t.tag=u,t.dump="{"+c+"}"}function v(t,e,n,i){var r,o,a,c,u,l,p="",f=t.tag,h=Object.keys(n);if(t.sortKeys===!0)h.sort();else if("function"==typeof t.sortKeys)h.sort(t.sortKeys);else if(t.sortKeys)throw new O("sortKeys must be a boolean or a function");for(r=0,o=h.length;o>r;r+=1)l="",i&&0===r||(l+=s(t,e)),a=h[r],c=n[a],A(t,e+1,a,!0,!0,!0)&&(u=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024,u&&(l+=t.dump&&N===t.dump.charCodeAt(0)?"?":"? "),l+=t.dump,u&&(l+=s(t,e)),A(t,e+1,c,!0,u)&&(l+=t.dump&&N===t.dump.charCodeAt(0)?":":": ",l+=t.dump,p+=l));t.tag=f,t.dump=p||"{}"}function x(t,e,n){var i,r,o,a,s,c;for(r=n?t.explicitTypes:t.implicitTypes,o=0,a=r.length;a>o;o+=1)if(s=r[o],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof e&&e instanceof s.instanceOf)&&(!s.predicate||s.predicate(e))){if(t.tag=n?s.tag:"?",s.represent){if(c=t.styleMap[s.tag]||s.defaultStyle,"[object Function]"===I.call(s.represent))i=s.represent(e,c);else{if(!E.call(s.represent,c))throw new O("!<"+s.tag+'> tag resolver accepts not "'+c+'" style');i=s.represent[c](e,c)}t.dump=i}return!0}return!1}function A(t,e,n,i,r,o){t.tag=null,t.dump=n,x(t,n,!1)||x(t,n,!0);var a=I.call(t.dump);i&&(i=0>t.flowLevel||t.flowLevel>e);var s,c,u="[object Object]"===a||"[object Array]"===a;if(u&&(s=t.duplicates.indexOf(n),c=-1!==s),(null!==t.tag&&"?"!==t.tag||c||2!==t.indent&&e>0)&&(r=!1),c&&t.usedDuplicates[s])t.dump="*ref_"+s;else{if(u&&c&&!t.usedDuplicates[s]&&(t.usedDuplicates[s]=!0),"[object Object]"===a)i&&0!==Object.keys(t.dump).length?(v(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(y(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else if("[object Array]"===a)i&&0!==t.dump.length?(g(t,e,t.dump,r),c&&(t.dump="&ref_"+s+t.dump)):(m(t,e,t.dump),c&&(t.dump="&ref_"+s+" "+t.dump));else{if("[object String]"!==a){if(t.skipInvalid)return!1;throw new O("unacceptable kind of an object to dump "+a)}"?"!==t.tag&&l(t,t.dump,e,o)}null!==t.tag&&"?"!==t.tag&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function b(t,e){var n,i,r=[],o=[];for(w(t,r,o),n=0,i=o.length;i>n;n+=1)e.duplicates.push(r[o[n]]);e.usedDuplicates=new Array(i)}function w(t,e,n){var i,r,o;if(null!==t&&"object"==typeof t)if(r=e.indexOf(t),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(e.push(t),Array.isArray(t))for(r=0,o=t.length;o>r;r+=1)w(t[r],e,n);else for(i=Object.keys(t),r=0,o=i.length;o>r;r+=1)w(t[i[r]],e,n)}function k(t,e){e=e||{};var n=new o(e);return b(t,n),A(n,0,t,!0,!0)?n.dump+"\n":""}function C(t,e){return k(t,j.extend({schema:_},e))}var j=t("./common"),O=t("./exception"),S=t("./schema/default_full"),_=t("./schema/default_safe"),I=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=9,N=10,T=13,M=32,L=33,D=34,U=35,q=37,Y=38,P=39,$=42,B=44,K=45,H=58,R=62,W=63,G=64,V=91,Z=93,z=96,J=123,Q=124,X=125,tt={};tt[0]="\\0",tt[7]="\\a",tt[8]="\\b",tt[9]="\\t",tt[10]="\\n",tt[11]="\\v",tt[12]="\\f",tt[13]="\\r",tt[27]="\\e",tt[34]='\\"',tt[92]="\\\\",tt[133]="\\N",tt[160]="\\_",tt[8232]="\\L",tt[8233]="\\P";var et=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(t){var e;if(t<this.checkpoint)throw e=new Error("position should be > checkpoint"),e.position=t,e.checkpoint=this.checkpoint,e;return this.result+=this.source.slice(this.checkpoint,t),this.checkpoint=t,this},u.prototype.escapeChar=function(){var t,e;return t=this.source.charCodeAt(this.checkpoint),e=tt[t]||r(t),this.result+=e,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},e.exports.dump=k,e.exports.safeDump=C},{"./common":2,"./exception":4,"./schema/default_full":9,"./schema/default_safe":10}],4:[function(t,e,n){"use strict";function i(t,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}var r=t("inherit");r(i,Error),i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},e.exports=i},{inherit:31}],5:[function(t,e,n){"use strict";function i(t){return 10===t||13===t}function r(t){return 9===t||32===t}function o(t){return 9===t||32===t||10===t||13===t}function a(t){return 44===t||91===t||93===t||123===t||125===t}function s(t){var e;return t>=48&&57>=t?t-48:(e=32|t,e>=97&&102>=e?e-97+10:-1)}function c(t){return 120===t?2:117===t?4:85===t?8:0}function u(t){return t>=48&&57>=t?t-48:-1}function l(t){return 48===t?"\x00":97===t?"\a":98===t?"\b":116===t?"   ":9===t?"       ":110===t?"\n":118===t?"\v":102===t?"\f":114===t?"\r":101===t?"\e":32===t?" ":34===t?'"':47===t?"/":92===t?"\\":78===t?"\85":95===t?" ":76===t?"\u2028":80===t?"\u2029":""}function p(t){return 65535>=t?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function f(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||H,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function h(t,e){return new $(e,new B(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function d(t,e){throw h(t,e)}function m(t,e){t.onWarning&&t.onWarning.call(null,h(t,e))}function g(t,e,n,i){var r,o,a,s;if(n>e){if(s=t.input.slice(e,n),i)for(r=0,o=s.length;o>r;r+=1)a=s.charCodeAt(r),9===a||a>=32&&1114111>=a||d(t,"expected valid JSON character");else X.test(s)&&d(t,"the stream contains non-printable characters");t.result+=s}}function y(t,e,n){var i,r,o,a;for(P.isObject(n)||d(t,"cannot merge mappings; the provided source object is unacceptable"),i=Object.keys(n),o=0,a=i.length;a>o;o+=1)r=i[o],R.call(e,r)||(e[r]=n[r])}function v(t,e,n,i,r){var o,a;if(i=String(i),null===e&&(e={}),"tag:yaml.org,2002:merge"===n)if(Array.isArray(r))for(o=0,a=r.length;a>o;o+=1)y(t,e,r[o]);else y(t,e,r);else e[i]=r;return e}function x(t){var e;e=t.input.charCodeAt(t.position),10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):d(t,"a line break is expected"),t.line+=1,t.lineStart=t.position}function A(t,e,n){for(var o=0,a=t.input.charCodeAt(t.position);0!==a;){for(;r(a);)a=t.input.charCodeAt(++t.position);if(e&&35===a)do a=t.input.charCodeAt(++t.position);while(10!==a&&13!==a&&0!==a);if(!i(a))break;for(x(t),a=t.input.charCodeAt(t.position),o++,t.lineIndent=0;32===a;)t.lineIndent++,a=t.input.charCodeAt(++t.position)}return-1!==n&&0!==o&&t.lineIndent<n&&m(t,"deficient indentation"),o}function b(t){var e,n=t.position;return e=t.input.charCodeAt(n),45!==e&&46!==e||t.input.charCodeAt(n+1)!==e||t.input.charCodeAt(n+2)!==e||(n+=3,e=t.input.charCodeAt(n),0!==e&&!o(e))?!1:!0}function w(t,e){1===e?t.result+=" ":e>1&&(t.result+=P.repeat("\n",e-1))}function k(t,e,n){var s,c,u,l,p,f,h,d,m,y=t.kind,v=t.result;if(m=t.input.charCodeAt(t.position),o(m)||a(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c)))return!1;for(t.kind="scalar",t.result="",u=l=t.position,p=!1;0!==m;){if(58===m){if(c=t.input.charCodeAt(t.position+1),o(c)||n&&a(c))break}else if(35===m){if(s=t.input.charCodeAt(t.position-1),o(s))break}else{if(t.position===t.lineStart&&b(t)||n&&a(m))break;if(i(m)){if(f=t.line,h=t.lineStart,d=t.lineIndent,A(t,!1,-1),t.lineIndent>=e){p=!0,m=t.input.charCodeAt(t.position);continue}t.position=l,t.line=f,t.lineStart=h,t.lineIndent=d;break}}p&&(g(t,u,l,!1),w(t,t.line-f),u=l=t.position,p=!1),r(m)||(l=t.position+1),m=t.input.charCodeAt(++t.position)}return g(t,u,l,!1),t.result?!0:(t.kind=y,t.result=v,!1)}function C(t,e){var n,r,o;if(n=t.input.charCodeAt(t.position),39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(g(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),39!==n)return!0;r=o=t.position,t.position++}else i(n)?(g(t,r,o,!0),w(t,A(t,!1,e)),r=o=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a single quoted scalar"):(t.position++,o=t.position);d(t,"unexpected end of the stream within a single quoted scalar")}function j(t,e){var n,r,o,a,u,l;if(l=t.input.charCodeAt(t.position),34!==l)return!1;for(t.kind="scalar",t.result="",t.position++,n=r=t.position;0!==(l=t.input.charCodeAt(t.position));){if(34===l)return g(t,n,t.position,!0),t.position++,!0;if(92===l){if(g(t,n,t.position,!0),l=t.input.charCodeAt(++t.position),i(l))A(t,!1,e);else if(256>l&&rt[l])t.result+=ot[l],t.position++;else if((u=c(l))>0){for(o=u,a=0;o>0;o--)l=t.input.charCodeAt(++t.position),(u=s(l))>=0?a=(a<<4)+u:d(t,"expected hexadecimal character");t.result+=p(a),t.position++}else d(t,"unknown escape sequence");n=r=t.position}else i(l)?(g(t,n,r,!0),w(t,A(t,!1,e)),n=r=t.position):t.position===t.lineStart&&b(t)?d(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}d(t,"unexpected end of the stream within a double quoted scalar")}function O(t,e){var n,i,r,a,s,c,u,l,p,f,h,m=!0,g=t.tag,y=t.anchor;if(h=t.input.charCodeAt(t.position),91===h)a=93,u=!1,i=[];else{if(123!==h)return!1;a=125,u=!0,i={}}for(null!==t.anchor&&(t.anchorMap[t.anchor]=i),h=t.input.charCodeAt(++t.position);0!==h;){if(A(t,!0,e),h=t.input.charCodeAt(t.position),h===a)return t.position++,t.tag=g,t.anchor=y,t.kind=u?"mapping":"sequence",t.result=i,!0;m||d(t,"missed comma between flow collection entries"),p=l=f=null,s=c=!1,63===h&&(r=t.input.charCodeAt(t.position+1),o(r)&&(s=c=!0,t.position++,A(t,!0,e))),n=t.line,T(t,e,W,!1,!0),p=t.tag,l=t.result,A(t,!0,e),h=t.input.charCodeAt(t.position),!c&&t.line!==n||58!==h||(s=!0,h=t.input.charCodeAt(++t.position),A(t,!0,e),T(t,e,W,!1,!0),f=t.result),u?v(t,i,p,l,f):i.push(s?v(t,null,p,l,f):l),A(t,!0,e),h=t.input.charCodeAt(t.position),44===h?(m=!0,h=t.input.charCodeAt(++t.position)):m=!1}d(t,"unexpected end of the stream within a flow collection")}function S(t,e){var n,o,a,s,c=z,l=!1,p=e,f=0,h=!1;if(s=t.input.charCodeAt(t.position),124===s)o=!1;else{if(62!==s)return!1;o=!0}for(t.kind="scalar",t.result="";0!==s;)if(s=t.input.charCodeAt(++t.position),43===s||45===s)z===c?c=43===s?Q:J:d(t,"repeat of a chomping mode identifier");else{if(!((a=u(s))>=0))break;0===a?d(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?d(t,"repeat of an indentation width identifier"):(p=e+a-1,l=!0)}if(r(s)){do s=t.input.charCodeAt(++t.position);while(r(s));if(35===s)do s=t.input.charCodeAt(++t.position);while(!i(s)&&0!==s)}for(;0!==s;){for(x(t),t.lineIndent=0,s=t.input.charCodeAt(t.position);(!l||t.lineIndent<p)&&32===s;)t.lineIndent++,s=t.input.charCodeAt(++t.position);if(!l&&t.lineIndent>p&&(p=t.lineIndent),i(s))f++;else{if(t.lineIndent<p){c===Q?t.result+=P.repeat("\n",f):c===z&&l&&(t.result+="\n");break}for(o?r(s)?(h=!0,t.result+=P.repeat("\n",f+1)):h?(h=!1,t.result+=P.repeat("\n",f+1)):0===f?l&&(t.result+=" "):t.result+=P.repeat("\n",f):l?t.result+=P.repeat("\n",f+1):t.result+=P.repeat("\n",f),l=!0,f=0,n=t.position;!i(s)&&0!==s;)s=t.input.charCodeAt(++t.position);g(t,n,t.position,!1)}}return!0}function _(t,e){var n,i,r,a=t.tag,s=t.anchor,c=[],u=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=c),r=t.input.charCodeAt(t.position);0!==r&&45===r&&(i=t.input.charCodeAt(t.position+1),o(i));)if(u=!0,t.position++,A(t,!0,-1)&&t.lineIndent<=e)c.push(null),r=t.input.charCodeAt(t.position);else if(n=t.line,T(t,e,V,!1,!0),c.push(t.result),A(t,!0,-1),r=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==r)d(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break;return u?(t.tag=a,t.anchor=s,t.kind="sequence",t.result=c,!0):!1}function I(t,e,n){var i,a,s,c,u=t.tag,l=t.anchor,p={},f=null,h=null,m=null,g=!1,y=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=p),c=t.input.charCodeAt(t.position);0!==c;){if(i=t.input.charCodeAt(t.position+1),s=t.line,63!==c&&58!==c||!o(i)){if(!T(t,n,G,!1,!0))break;if(t.line===s){for(c=t.input.charCodeAt(t.position);r(c);)c=t.input.charCodeAt(++t.position);if(58===c)c=t.input.charCodeAt(++t.position),o(c)||d(t,"a whitespace character is expected after the key-value separator within a block mapping"),g&&(v(t,p,f,h,null),f=h=m=null),y=!0,g=!1,a=!1,f=t.tag,h=t.result;else{if(!y)return t.tag=u,t.anchor=l,!0;d(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return t.tag=u,t.anchor=l,!0;d(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===c?(g&&(v(t,p,f,h,null),f=h=m=null),y=!0,g=!0,a=!0):g?(g=!1,a=!0):d(t,"incomplete explicit mapping pair; a key node is missed"),t.position+=1,c=i;if((t.line===s||t.lineIndent>e)&&(T(t,e,Z,!0,a)&&(g?h=t.result:m=t.result),g||(v(t,p,f,h,m),f=h=m=null),A(t,!0,-1),c=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==c)d(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return g&&v(t,p,f,h,null),y&&(t.tag=u,t.anchor=l,t.kind="mapping",t.result=p),y}function E(t){var e,n,i,r,a=!1,s=!1;if(r=t.input.charCodeAt(t.position),33!==r)return!1;if(null!==t.tag&&d(t,"duplication of a tag property"),r=t.input.charCodeAt(++t.position),60===r?(a=!0,r=t.input.charCodeAt(++t.position)):33===r?(s=!0,n="!!",r=t.input.charCodeAt(++t.position)):n="!",e=t.position,a){do r=t.input.charCodeAt(++t.position);while(0!==r&&62!==r);t.position<t.length?(i=t.input.slice(e,t.position),r=t.input.charCodeAt(++t.position)):d(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!o(r);)33===r&&(s?d(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),nt.test(n)||d(t,"named tag handle cannot contain such characters"),s=!0,e=t.position+1)),r=t.input.charCodeAt(++t.position);i=t.input.slice(e,t.position),et.test(i)&&d(t,"tag suffix cannot contain flow indicator characters")}return i&&!it.test(i)&&d(t,"tag name cannot contain such characters: "+i),a?t.tag=i:R.call(t.tagMap,n)?t.tag=t.tagMap[n]+i:"!"===n?t.tag="!"+i:"!!"===n?t.tag="tag:yaml.org,2002:"+i:d(t,'undeclared tag handle "'+n+'"'),!0}function F(t){var e,n;if(n=t.input.charCodeAt(t.position),38!==n)return!1;for(null!==t.anchor&&d(t,"duplication of an anchor property"),n=t.input.charCodeAt(++t.position),e=t.position;0!==n&&!o(n)&&!a(n);)n=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function N(t){var e,n,i;if(i=t.input.charCodeAt(t.position),42!==i)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!o(i)&&!a(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&d(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(n)||d(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],A(t,!0,-1),!0}function T(t,e,n,i,r){var o,a,s,c,u,l,p,f,h=1,m=!1,g=!1;if(t.tag=null,t.anchor=null,t.kind=null,t.result=null,o=a=s=Z===n||V===n,i&&A(t,!0,-1)&&(m=!0,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)),1===h)for(;E(t)||F(t);)A(t,!0,-1)?(m=!0,s=o,t.lineIndent>e?h=1:t.lineIndent===e?h=0:t.lineIndent<e&&(h=-1)):s=!1;if(s&&(s=m||r),(1===h||Z===n)&&(p=W===n||G===n?e:e+1,f=t.position-t.lineStart,1===h?s&&(_(t,f)||I(t,f,p))||O(t,p)?g=!0:(a&&S(t,p)||C(t,p)||j(t,p)?g=!0:N(t)?(g=!0,(null!==t.tag||null!==t.anchor)&&d(t,"alias node should not have any properties")):k(t,p,W===n)&&(g=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===h&&(g=s&&_(t,f))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(c=0,u=t.implicitTypes.length;u>c;c+=1)if(l=t.implicitTypes[c],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&(t.anchorMap[t.anchor]=t.result);break}}else R.call(t.typeMap,t.tag)?(l=t.typeMap[t.tag],null!==t.result&&l.kind!==t.kind&&d(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result)?(t.result=l.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):d(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):d(t,"unknown tag !<"+t.tag+">");return null!==t.tag||null!==t.anchor||g}function M(t){var e,n,a,s,c=t.position,u=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(s=t.input.charCodeAt(t.position))&&(A(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==s));){for(u=!0,s=t.input.charCodeAt(++t.position),e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);for(n=t.input.slice(e,t.position),a=[],n.length<1&&d(t,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=t.input.charCodeAt(++t.position);if(35===s){do s=t.input.charCodeAt(++t.position);while(0!==s&&!i(s));break}if(i(s))break;for(e=t.position;0!==s&&!o(s);)s=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==s&&x(t),R.call(st,n)?st[n](t,n,a):m(t,'unknown document directive "'+n+'"')}return A(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,A(t,!0,-1)):u&&d(t,"directives end mark is expected"),T(t,t.lineIndent-1,Z,!1,!0),A(t,!0,-1),t.checkLineBreaks&&tt.test(t.input.slice(c,t.position))&&m(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&b(t)?void(46===t.input.charCodeAt(t.position)&&(t.position+=3,A(t,!0,-1))):void(t.position<t.length-1&&d(t,"end of the stream or a document separator is expected"))}function L(t,e){t=String(t),e=e||{},0!==t.length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));var n=new f(t,e);for(n.input+="\x00";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)M(n);return n.documents}function D(t,e,n){var i,r,o=L(t,n);for(i=0,r=o.length;r>i;i+=1)e(o[i])}function U(t,e){var n=L(t,e);if(0===n.length)return void 0;if(1===n.length)return n[0];throw new $("expected a single document in the stream, but found more")}function q(t,e,n){D(t,e,P.extend({schema:K},n))}function Y(t,e){return U(t,P.extend({schema:K},e))}for(var P=t("./common"),$=t("./exception"),B=t("./mark"),K=t("./schema/default_safe"),H=t("./schema/default_full"),R=Object.prototype.hasOwnProperty,W=1,G=2,V=3,Z=4,z=1,J=2,Q=3,X=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,tt=/[\x85\u2028\u2029]/,et=/[,\[\]\{\}]/,nt=/^(?:!|!!|![a-z\-]+!)$/i,it=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,rt=new Array(256),ot=new Array(256),at=0;256>at;at++)rt[at]=l(at)?1:0,ot[at]=l(at);var st={YAML:function(t,e,n){var i,r,o;null!==t.version&&d(t,"duplication of %YAML directive"),1!==n.length&&d(t,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),null===i&&d(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),o=parseInt(i[2],10),1!==r&&d(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=2>o,1!==o&&2!==o&&m(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&d(t,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],nt.test(i)||d(t,"ill-formed tag handle (first argument) of the TAG directive"),R.call(t.tagMap,i)&&d(t,'there is a previously declared suffix for "'+i+'" tag handle'),it.test(r)||d(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};e.exports.loadAll=D,e.exports.load=U,e.exports.safeLoadAll=q,e.exports.safeLoad=Y},{"./common":2,"./exception":4,"./mark":6,"./schema/default_full":9,"./schema/default_safe":10}],6:[function(t,e,n){"use strict";function i(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}var r=t("./common");i.prototype.getSnippet=function(t,e){var n,i,o,a,s;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",i=this.position;i>0&&-1==="\x00\r\n\85\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>e/2-1){n=" ... ",i+=5;break}for(o="",a=this.position;a<this.buffer.length&&-1==="\x00\r\n\85\u2028\u2029".indexOf(this.buffer.charAt(a));)if(a+=1,a-this.position>e/2-1){o=" ... ",a-=5;break}return s=this.buffer.slice(i,a),r.repeat(" ",t)+n+s+o+"\n"+r.repeat(" ",t+this.position-i+n.length)+"^"},i.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet(),e&&(n+=":\n"+e)),n},e.exports=i},{"./common":2}],7:[function(t,e,n){"use strict";function i(t,e,n){var r=[];return t.include.forEach(function(t){n=i(t,e,n)}),t[e].forEach(function(t){n.forEach(function(e,n){e.tag===t.tag&&r.push(n)}),n.push(t)}),n.filter(function(t,e){return-1===r.indexOf(e)})}function r(){function t(t){i[t.tag]=t}var e,n,i={};for(e=0,n=arguments.length;n>e;e+=1)arguments[e].forEach(t);return i}function o(t){this.include=t.include||[],this.implicit=t.implicit||[],this.explicit=t.explicit||[],this.implicit.forEach(function(t){if(t.loadKind&&"scalar"!==t.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var a=t("./common"),s=t("./exception"),c=t("./type");o.DEFAULT=null,o.create=function(){var t,e;switch(arguments.length){case 1:t=o.DEFAULT,e=arguments[0];break;case 2:t=arguments[0],e=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(t=a.toArray(t),e=a.toArray(e),!t.every(function(t){return t instanceof o}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!e.every(function(t){return t instanceof c}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new o({include:t,explicit:e})},e.exports=o},{"./common":2,"./exception":4,"./type":13}],8:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./json")]})},{"../schema":7,"./json":12}],9:[function(t,e,n){"use strict";var i=t("../schema");e.exports=i.DEFAULT=new i({include:[t("./default_safe")],explicit:[t("../type/js/undefined"),t("../type/js/regexp"),t("../type/js/function")]})},{"../schema":7,"../type/js/function":18,"../type/js/regexp":19,"../type/js/undefined":20,"./default_safe":10}],10:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./core")],implicit:[t("../type/timestamp"),t("../type/merge")],explicit:[t("../type/binary"),t("../type/omap"),t("../type/pairs"),t("../type/set")]})},{"../schema":7,"../type/binary":14,"../type/merge":22,"../type/omap":24,"../type/pairs":25,"../type/set":27,"../type/timestamp":29,"./core":8}],11:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({explicit:[t("../type/str"),t("../type/seq"),t("../type/map")]})},{"../schema":7,"../type/map":21,"../type/seq":26,"../type/str":28}],12:[function(t,e,n){"use strict";var i=t("../schema");e.exports=new i({include:[t("./failsafe")],implicit:[t("../type/null"),t("../type/bool"),t("../type/int"),t("../type/float")]})},{"../schema":7,"../type/bool":15,"../type/float":16,"../type/int":17,"../type/null":23,"./failsafe":11}],13:[function(t,e,n){"use strict";function i(t){var e={};return null!==t&&Object.keys(t).forEach(function(n){t[n].forEach(function(t){e[String(t)]=n})}),e}function r(t,e){if(e=e||{},Object.keys(e).forEach(function(e){if(-1===a.indexOf(e))throw new o('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=i(e.styleAliases||null),-1===s.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var o=t("./exception"),a=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];e.exports=r},{"./exception":4}],14:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=u;for(n=0;r>n;n++)if(e=o.indexOf(t.charAt(n)),!(e>64)){if(0>e)return!1;i+=6}return i%8===0}function r(t){var e,n,i=t.replace(/[\r\n=]/g,""),r=i.length,o=u,a=0,c=[];for(e=0;r>e;e++)e%4===0&&e&&(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)),a=a<<6|o.indexOf(i.charAt(e));return n=r%4*6,0===n?(c.push(a>>16&255),c.push(a>>8&255),c.push(255&a)):18===n?(c.push(a>>10&255),c.push(a>>2&255)):12===n&&c.push(a>>4&255),s?new s(c):c}function o(t){var e,n,i="",r=0,o=t.length,a=u;for(e=0;o>e;e++)e%3===0&&e&&(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return n=o%3,0===n?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}function a(t){return s&&s.isBuffer(t)}var s=t("buffer").Buffer,c=t("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new c("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,\r
+construct:r,predicate:a,represent:o})},{"../type":13,buffer:30}],15:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;var e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function o(t){return"[object Boolean]"===Object.prototype.toString.call(t)}var a=t("../type");e.exports=new a("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})},{"../type":13}],16:[function(t,e,n){"use strict";function i(t){return null===t?!1:u.test(t)?!0:!1}function r(t){var e,n,i,r;return e=t.replace(/_/g,"").toLowerCase(),n="-"===e[0]?-1:1,r=[],0<="+-".indexOf(e[0])&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:0<=e.indexOf(":")?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)}function o(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(t))return"-0.0";return n=t.toString(10),l.test(n)?n.replace("e",".e"):n}function a(t){return"[object Number]"===Object.prototype.toString.call(t)&&(0!==t%1||s.isNegativeZero(t))}var s=t("../common"),c=t("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),l=/^[-+]?[0-9]+e/;e.exports=new c("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o,defaultStyle:"lowercase"})},{"../common":2,"../type":13}],17:[function(t,e,n){"use strict";function i(t){return t>=48&&57>=t||t>=65&&70>=t||t>=97&&102>=t}function r(t){return t>=48&&55>=t}function o(t){return t>=48&&57>=t}function a(t){if(null===t)return!1;var e,n=t.length,a=0,s=!1;if(!n)return!1;if(e=t[a],("-"===e||"+"===e)&&(e=t[++a]),"0"===e){if(a+1===n)return!0;if(e=t[++a],"b"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if("0"!==e&&"1"!==e)return!1;s=!0}return s}if("x"===e){for(a++;n>a;a++)if(e=t[a],"_"!==e){if(!i(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(!r(t.charCodeAt(a)))return!1;s=!0}return s}for(;n>a;a++)if(e=t[a],"_"!==e){if(":"===e)break;if(!o(t.charCodeAt(a)))return!1;s=!0}return s?":"!==e?!0:/^(:[0-5]?[0-9])+$/.test(t.slice(a)):!1}function s(t){var e,n,i=t,r=1,o=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),e=i[0],("-"===e||"+"===e)&&("-"===e&&(r=-1),i=i.slice(1),e=i[0]),"0"===i?0:"0"===e?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(t){o.unshift(parseInt(t,10))}),i=0,n=1,o.forEach(function(t){i+=t*n,n*=60}),r*i):r*parseInt(i,10)}function c(t){return"[object Number]"===Object.prototype.toString.call(t)&&0===t%1&&!u.isNegativeZero(t)}var u=t("../common"),l=t("../type");e.exports=new l("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:s,predicate:c,represent:{binary:function(t){return"0b"+t.toString(2)},octal:function(t){return"0"+t.toString(8)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return"0x"+t.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":2,"../type":13}],18:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;try{var e="("+t+")",n=s.parse(e,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(i){return!1}}function r(t){var e,n="("+t+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(t){r.push(t.name)}),e=i.body[0].expression.body.range,new Function(r,n.slice(e[0]+1,e[1]-1))}function o(t){return t.toString()}function a(t){return"[object Function]"===Object.prototype.toString.call(t)}var s;try{s=t("esprima")}catch(c){"undefined"!=typeof window&&(s=window.esprima)}var u=t("../../type");e.exports=new u("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13,esprima:"esprima"}],19:[function(t,e,n){"use strict";function i(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1;e=e.slice(1,e.length-i.length-1)}try{return!0}catch(r){return!1}}function r(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)}function o(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function a(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],20:[function(t,e,n){"use strict";function i(){return!0}function r(){return void 0}function o(){return""}function a(t){return"undefined"==typeof t}var s=t("../../type");e.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:o})},{"../../type":13}],21:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},{"../type":13}],22:[function(t,e,n){"use strict";function i(t){return"<<"===t||null===t}var r=t("../type");e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":13}],23:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function o(t){return null===t}var a=t("../type");e.exports=new a("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":13}],24:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,c=[],u=t;for(e=0,n=u.length;n>e;e+=1){if(i=u[e],o=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(a.call(i,r)){if(o)return!1;o=!0}if(!o)return!1;if(-1!==c.indexOf(r))return!1;c.push(r)}return!0}function r(t){return null!==t?t:[]}var o=t("../type"),a=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],25:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n,i,r,o,s=t;for(o=new Array(s.length),e=0,n=s.length;n>e;e+=1){if(i=s[e],"[object Object]"!==a.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;o[e]=[r[0],i[r[0]]]}return!0}function r(t){if(null===t)return[];var e,n,i,r,o,a=t;for(o=new Array(a.length),e=0,n=a.length;n>e;e+=1)i=a[e],r=Object.keys(i),o[e]=[r[0],i[r[0]]];return o}var o=t("../type"),a=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":13}],26:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},{"../type":13}],27:[function(t,e,n){"use strict";function i(t){if(null===t)return!0;var e,n=t;for(e in n)if(a.call(n,e)&&null!==n[e])return!1;return!0}function r(t){return null!==t?t:{}}var o=t("../type"),a=Object.prototype.hasOwnProperty;e.exports=new o("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":13}],28:[function(t,e,n){"use strict";var i=t("../type");e.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},{"../type":13}],29:[function(t,e,n){"use strict";function i(t){return null===t?!1:null===s.exec(t)?!1:!0}function r(t){var e,n,i,r,o,a,c,u,l,p,f=0,h=null;if(e=s.exec(t),null===e)throw new Error("Date resolve error");if(n=+e[1],i=+e[2]-1,r=+e[3],!e[4])return new Date(Date.UTC(n,i,r));if(o=+e[4],a=+e[5],c=+e[6],e[7]){for(f=e[7].slice(0,3);f.length<3;)f+="0";f=+f}return e[9]&&(u=+e[10],l=+(e[11]||0),h=6e4*(60*u+l),"-"===e[9]&&(h=-h)),p=new Date(Date.UTC(n,i,r,o,a,c,f)),h&&p.setTime(p.getTime()-h),p}function o(t){return t.toISOString()}var a=t("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");e.exports=new a("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:o})},{"../type":13}],30:[function(t,e,n){},{}],31:[function(t,e,n){e.exports=t("./lib/inherit")},{"./lib/inherit":32}],32:[function(e,n,i){!function(e){function r(t){var e=f(t);if(v)for(var n,i=0;n=b[i++];)t.hasOwnProperty(n)&&e.push(n);return e}function o(t,e,n){for(var i,o,a=r(n),s=0,u=a.length;u>s;)"__self"!==(i=a[s++])&&(o=n[i],g(o)&&(!c||o.toString().indexOf(".__base")>-1)?e[i]=function(n,i){var r=t[n]?t[n]:"__constructor"===n?e.__self.__parent:y;return function(){var t=this.__base;this.__base=r;var e=i.apply(this,arguments);return this.__base=t,e}}(i,o):e[i]=o)}function a(t,e){for(var n,i=1;n=t[i++];)e?g(n)?s.self(e,n.prototype,n):s.self(e,n):e=g(n)?s(t[0],n.prototype,n):s(t[0],n);return e||t[0]}function s(){var t=arguments,e=m(t[0]),n=e||g(t[0]),i=n?e?a(t[0]):t[0]:u,r=t[n?1:0]||{},s=t[n?2:1],c=r.__constructor||n&&i.prototype.__constructor?function(){return this.__constructor.apply(this,arguments)}:n?function(){return i.apply(this,arguments)}:function(){};if(!n)return c.prototype=r,c.prototype.__self=c.prototype.constructor=c,h(c,s);h(c,i),c.__parent=i;var l=i.prototype,f=c.prototype=p(l);return f.__self=f.constructor=c,r&&o(l,f,r),s&&o(i,c,s),c}var c=function(){"_"}.toString().indexOf("_")>-1,u=function(){},l=Object.prototype.hasOwnProperty,p=Object.create||function(t){var e=function(){};return e.prototype=t,new e},f=Object.keys||function(t){var e=[];for(var n in t)l.call(t,n)&&e.push(n);return e},h=function(t,e){for(var n in e)l.call(e,n)&&(t[n]=e[n]);return t},d=Object.prototype.toString,m=Array.isArray||function(t){return"[object Array]"===d.call(t)},g=function(t){return"[object Function]"===d.call(t)},y=function(){},v=!0,x={toString:""};for(var A in x)x.hasOwnProperty(A)&&(v=!1);var b=v?["toString","valueOf"]:null;s.self=function(){var t=arguments,e=m(t[0]),n=e?a(t[0],t[0][0]):t[0],i=t[1],r=t[2],s=n.prototype;return i&&o(s,s,i),r&&o(n,n,r),n};var w=!0;"object"==typeof i&&(n.exports=s,w=!1),"object"==typeof modules&&(modules.define("inherit",function(t){t(s)}),w=!1),"function"==typeof t&&(t(function(t,e,n){n.exports=s}),w=!1),w&&(e.inherit=s)}(this)},{}],"/":[function(t,e,n){"use strict";var i=t("./lib/js-yaml.js");e.exports=i},{"./lib/js-yaml.js":1}]},{},[])("/")});\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jsoneditor.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jsoneditor.min.js
new file mode 100644 (file)
index 0000000..187d87a
--- /dev/null
@@ -0,0 +1,11 @@
+/*! JSON Editor v0.7.22 - JSON Schema -> HTML Editor\r
+ * By Jeremy Dorn - https://github.com/jdorn/json-editor/\r
+ * Released under the MIT license\r
+ *\r
+ * Date: 2015-08-12\r
+ */\r
+!function(){var a;!function(){var b=!1,c=/xyz/.test(function(){window.postMessage("xyz")})?/\b_super\b/:/.*/;return a=function(){},a.extend=function(a){function d(){!b&&this.init&&this.init.apply(this,arguments)}var e=this.prototype;b=!0;var f=new this;b=!1;for(var g in a)f[g]="function"==typeof a[g]&&"function"==typeof e[g]&&c.test(a[g])?function(a,b){return function(){var c=this._super;this._super=e[a];var d=b.apply(this,arguments);return this._super=c,d}}(g,a[g]):a[g];return d.prototype=f,d.prototype.constructor=d,d.extend=arguments.callee,d},a}(),function(){function a(a,b){b=b||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(a,b.bubbles,b.cancelable,b.detail),c}a.prototype=window.Event.prototype,window.CustomEvent=a}(),function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c<b.length&&!window.requestAnimationFrame;++c)window.requestAnimationFrame=window[b[c]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[b[c]+"CancelAnimationFrame"]||window[b[c]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(b,c){var d=(new Date).getTime(),e=Math.max(0,16-(d-a)),f=window.setTimeout(function(){b(d+e)},e);return a=d+e,f}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(a){clearTimeout(a)})}(),function(){Array.isArray||(Array.isArray=function(a){return"[object Array]"===Object.prototype.toString.call(a)})}();var b=function(a){return"object"!=typeof a||a.nodeType||null!==a&&a===a.window?!1:a.constructor&&!Object.prototype.hasOwnProperty.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},c=function(a){var d,e,f;for(e=1;e<arguments.length;e++){d=arguments[e];for(f in d)d.hasOwnProperty(f)&&(d[f]&&b(d[f])?(a.hasOwnProperty(f)||(a[f]={}),c(a[f],d[f])):a[f]=d[f])}return a},d=function(a,b){if(a&&"object"==typeof a){var c;if(Array.isArray(a)||"number"==typeof a.length&&a.length>0&&a.length-1 in a){for(c=0;c<a.length;c++)if(b(c,a[c])===!1)return}else if(Object.keys){var d=Object.keys(a);for(c=0;c<d.length;c++)if(b(d[c],a[d[c]])===!1)return}else for(c in a)if(a.hasOwnProperty(c)&&b(c,a[c])===!1)return}},e=function(a,b){var c=document.createEvent("HTMLEvents");c.initEvent(b,!0,!0),a.dispatchEvent(c)},f=function(a,b){if(!(a instanceof Element))throw new Error("element should be an instance of Element");b=c({},f.defaults.options,b||{}),this.element=a,this.options=b,this.init()};f.prototype={constructor:f,init:function(){var a=this;this.ready=!1;var b=f.defaults.themes[this.options.theme||f.defaults.theme];if(!b)throw"Unknown theme "+(this.options.theme||f.defaults.theme);this.schema=this.options.schema,this.theme=new b,this.template=this.options.template,this.refs=this.options.refs||{},this.uuid=0,this.__data={};var c=f.defaults.iconlibs[this.options.iconlib||f.defaults.iconlib];c&&(this.iconlib=new c),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.translate=this.options.translate||f.defaults.translate,this._loadExternalRefs(this.schema,function(){a._getDefinitions(a.schema),a.validator=new f.Validator(a);var b=a.getEditorClass(a.schema);a.root=a.createEditor(b,{jsoneditor:a,schema:a.schema,required:!0,container:a.root_container}),a.root.preBuild(),a.root.build(),a.root.postBuild(),a.options.startval&&a.root.setValue(a.options.startval),a.validation_results=a.validator.validate(a.root.getValue()),a.root.showValidationErrors(a.validation_results),a.ready=!0,window.requestAnimationFrame(function(){a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),a.root.showValidationErrors(a.validation_results),a.trigger("ready"),a.trigger("change"))})})},getValue:function(){if(!this.ready)throw"JSON Editor not ready yet.  Listen for 'ready' event before getting the value";return this.root.getValue()},setValue:function(a){if(!this.ready)throw"JSON Editor not ready yet.  Listen for 'ready' event before setting the value";return this.root.setValue(a),this},validate:function(a){if(!this.ready)throw"JSON Editor not ready yet.  Listen for 'ready' event before validating";return 1===arguments.length?this.validator.validate(a):this.validation_results},destroy:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.destroyed=!0)},on:function(a,b){return this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[],this.callbacks[a].push(b),this},off:function(a,b){if(a&&b){this.callbacks=this.callbacks||{},this.callbacks[a]=this.callbacks[a]||[];for(var c=[],d=0;d<this.callbacks[a].length;d++)this.callbacks[a][d]!==b&&c.push(this.callbacks[a][d]);this.callbacks[a]=c}else a?(this.callbacks=this.callbacks||{},this.callbacks[a]=[]):this.callbacks={};return this},trigger:function(a){if(this.callbacks&&this.callbacks[a]&&this.callbacks[a].length)for(var b=0;b<this.callbacks[a].length;b++)this.callbacks[a][b]();return this},setOption:function(a,b){if("show_errors"!==a)throw"Option "+a+" must be set during instantiation and cannot be changed later";return this.options.show_errors=b,this.onChange(),this},getEditorClass:function(a){var b;if(a=this.expandSchema(a),d(f.defaults.resolvers,function(c,d){var e=d(a);return e&&f.defaults.editors[e]?(b=e,!1):void 0}),!b)throw"Unknown editor for schema "+JSON.stringify(a);if(!f.defaults.editors[b])throw"Unknown editor "+b;return f.defaults.editors[b]},createEditor:function(a,b){return b=c({},a.options||{},b),new a(b)},onChange:function(){if(this.ready&&!this.firing_change){this.firing_change=!0;var a=this;return window.requestAnimationFrame(function(){a.firing_change=!1,a.ready&&(a.validation_results=a.validator.validate(a.root.getValue()),"never"!==a.options.show_errors?a.root.showValidationErrors(a.validation_results):a.root.showValidationErrors([]),a.trigger("change"))}),this}},compileTemplate:function(a,b){b=b||f.defaults.template;var c;if("string"==typeof b){if(!f.defaults.templates[b])throw"Unknown template engine "+b;if(c=f.defaults.templates[b](),!c)throw"Template engine "+b+" missing required library."}else c=b;if(!c)throw"No template engine set";if(!c.compile)throw"Invalid template engine set";return c.compile(a)},_data:function(a,b,c){if(3!==arguments.length)return a.hasAttribute("data-jsoneditor-"+b)?this.__data[a.getAttribute("data-jsoneditor-"+b)]:null;var d;a.hasAttribute("data-jsoneditor-"+b)?d=a.getAttribute("data-jsoneditor-"+b):(d=this.uuid++,a.setAttribute("data-jsoneditor-"+b,d)),this.__data[d]=c},registerEditor:function(a){return this.editors=this.editors||{},this.editors[a.path]=a,this},unregisterEditor:function(a){return this.editors=this.editors||{},this.editors[a.path]=null,this},getEditor:function(a){return this.editors?this.editors[a]:void 0},watch:function(a,b){return this.watchlist=this.watchlist||{},this.watchlist[a]=this.watchlist[a]||[],this.watchlist[a].push(b),this},unwatch:function(a,b){if(!this.watchlist||!this.watchlist[a])return this;if(!b)return this.watchlist[a]=null,this;for(var c=[],d=0;d<this.watchlist[a].length;d++)this.watchlist[a][d]!==b&&c.push(this.watchlist[a][d]);return this.watchlist[a]=c.length?c:null,this},notifyWatchers:function(a){if(!this.watchlist||!this.watchlist[a])return this;for(var b=0;b<this.watchlist[a].length;b++)this.watchlist[a][b]()},isEnabled:function(){return!this.root||this.root.isEnabled()},enable:function(){this.root.enable()},disable:function(){this.root.disable()},_getDefinitions:function(a,b){if(b=b||"#/definitions/",a.definitions)for(var c in a.definitions)a.definitions.hasOwnProperty(c)&&(this.refs[b+c]=a.definitions[c],a.definitions[c].definitions&&this._getDefinitions(a.definitions[c],b+c+"/definitions/"))},_getExternalRefs:function(a){var b={},c=function(a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=!0)};a.$ref&&"object"!=typeof a.$ref&&"#"!==a.$ref.substr(0,1)&&!this.refs[a.$ref]&&(b[a.$ref]=!0);for(var d in a)if(a.hasOwnProperty(d))if(a[d]&&"object"==typeof a[d]&&Array.isArray(a[d]))for(var e=0;e<a[d].length;e++)"object"==typeof a[d][e]&&c(this._getExternalRefs(a[d][e]));else a[d]&&"object"==typeof a[d]&&c(this._getExternalRefs(a[d]));return b},_loadExternalRefs:function(a,b){var c=this,e=this._getExternalRefs(a),f=0,g=0,h=!1;d(e,function(a){if(!c.refs[a]){if(!c.options.ajax)throw"Must set ajax option to true to load external ref "+a;c.refs[a]="loading",g++;var d=new XMLHttpRequest;d.open("GET",a,!0),d.onreadystatechange=function(){if(4==d.readyState){if(200!==d.status)throw window.console.log(d),"Failed to fetch ref via ajax- "+a;var e;try{e=JSON.parse(d.responseText)}catch(i){throw window.console.log(i),"Failed to parse external ref "+a}if(!e||"object"!=typeof e)throw"External ref does not contain a valid schema - "+a;c.refs[a]=e,c._loadExternalRefs(e,function(){f++,f>=g&&!h&&(h=!0,b())})}},d.send()}}),g||b()},expandRefs:function(a){for(a=c({},a);a.$ref;){var b=a.$ref;delete a.$ref,this.refs[b]||(b=decodeURIComponent(b)),a=this.extendSchemas(a,this.refs[b])}return a},expandSchema:function(a){var b,e=this,f=c({},a);if("object"==typeof a.type&&(Array.isArray(a.type)?d(a.type,function(b,c){"object"==typeof c&&(a.type[b]=e.expandSchema(c))}):a.type=e.expandSchema(a.type)),"object"==typeof a.disallow&&(Array.isArray(a.disallow)?d(a.disallow,function(b,c){"object"==typeof c&&(a.disallow[b]=e.expandSchema(c))}):a.disallow=e.expandSchema(a.disallow)),a.anyOf&&d(a.anyOf,function(b,c){a.anyOf[b]=e.expandSchema(c)}),a.dependencies&&d(a.dependencies,function(b,c){"object"!=typeof c||Array.isArray(c)||(a.dependencies[b]=e.expandSchema(c))}),a.not&&(a.not=this.expandSchema(a.not)),a.allOf){for(b=0;b<a.allOf.length;b++)f=this.extendSchemas(f,this.expandSchema(a.allOf[b]));delete f.allOf}if(a["extends"]){if(Array.isArray(a["extends"]))for(b=0;b<a["extends"].length;b++)f=this.extendSchemas(f,this.expandSchema(a["extends"][b]));else f=this.extendSchemas(f,this.expandSchema(a["extends"]));delete f["extends"]}if(a.oneOf){var g=c({},f);for(delete g.oneOf,b=0;b<a.oneOf.length;b++)f.oneOf[b]=this.extendSchemas(this.expandSchema(a.oneOf[b]),g)}return this.expandRefs(f)},extendSchemas:function(a,b){a=c({},a),b=c({},b);var e=this,f={};return d(a,function(a,c){"undefined"!=typeof b[a]?"required"===a&&"object"==typeof c&&Array.isArray(c)?f.required=c.concat(b[a]).reduce(function(a,b){return a.indexOf(b)<0&&a.push(b),a},[]):"type"!==a||"string"!=typeof c&&!Array.isArray(c)?"object"==typeof c&&Array.isArray(c)?f[a]=c.filter(function(c){return-1!==b[a].indexOf(c)}):"object"==typeof c&&null!==c?f[a]=e.extendSchemas(c,b[a]):f[a]=c:("string"==typeof c&&(c=[c]),"string"==typeof b.type&&(b.type=[b.type]),f.type=c.filter(function(a){return-1!==b.type.indexOf(a)}),1===f.type.length&&"string"==typeof f.type[0]&&(f.type=f.type[0])):f[a]=c}),d(b,function(b,c){"undefined"==typeof a[b]&&(f[b]=c)}),f}},f.defaults={themes:{},templates:{},iconlibs:{},editors:{},languages:{},resolvers:[],custom_validators:[]},f.Validator=a.extend({init:function(a,b){this.jsoneditor=a,this.schema=b||this.jsoneditor.schema,this.options={},this.translate=this.jsoneditor.translate||f.defaults.translate},validate:function(a){return this._validateSchema(this.schema,a)},_validateSchema:function(a,b,e){var g,h,i,j=this,k=[],l=JSON.stringify(b);if(e=e||"root",a=c({},this.jsoneditor.expandRefs(a)),a.required&&a.required===!0){if("undefined"==typeof b)return k.push({path:e,property:"required",message:this.translate("error_notset")}),k}else if("undefined"==typeof b){if(!this.jsoneditor.options.required_by_default)return k;k.push({path:e,property:"required",message:this.translate("error_notset")})}if(a["enum"]){for(g=!1,h=0;h<a["enum"].length;h++)l===JSON.stringify(a["enum"][h])&&(g=!0);g||k.push({path:e,property:"enum",message:this.translate("error_enum")})}if(a["extends"])for(h=0;h<a["extends"].length;h++)k=k.concat(this._validateSchema(a["extends"][h],b,e));if(a.allOf)for(h=0;h<a.allOf.length;h++)k=k.concat(this._validateSchema(a.allOf[h],b,e));if(a.anyOf){for(g=!1,h=0;h<a.anyOf.length;h++)if(!this._validateSchema(a.anyOf[h],b,e).length){g=!0;break}g||k.push({path:e,property:"anyOf",message:this.translate("error_anyOf")})}if(a.oneOf){g=0;var m=[];for(h=0;h<a.oneOf.length;h++){var n=this._validateSchema(a.oneOf[h],b,e);for(n.length||g++,i=0;i<n.length;i++)n[i].path=e+".oneOf["+h+"]"+n[i].path.substr(e.length);m=m.concat(n)}1!==g&&(k.push({path:e,property:"oneOf",message:this.translate("error_oneOf",[g])}),k=k.concat(m))}if(a.not&&(this._validateSchema(a.not,b,e).length||k.push({path:e,property:"not",message:this.translate("error_not")})),a.type)if(Array.isArray(a.type)){for(g=!1,h=0;h<a.type.length;h++)if(this._checkType(a.type[h],b)){g=!0;break}g||k.push({path:e,property:"type",message:this.translate("error_type_union")})}else this._checkType(a.type,b)||k.push({path:e,property:"type",message:this.translate("error_type",[a.type])});if(a.disallow)if(Array.isArray(a.disallow)){for(g=!0,h=0;h<a.disallow.length;h++)if(this._checkType(a.disallow[h],b)){g=!1;break}g||k.push({path:e,property:"disallow",message:this.translate("error_disallow_union")})}else this._checkType(a.disallow,b)&&k.push({path:e,property:"disallow",message:this.translate("error_disallow",[a.disallow])});if("number"==typeof b)(a.multipleOf||a.divisibleBy)&&(g=b/(a.multipleOf||a.divisibleBy),g!==Math.floor(g)&&k.push({path:e,property:a.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[a.multipleOf||a.divisibleBy])})),a.hasOwnProperty("maximum")&&(a.exclusiveMaximum&&b>=a.maximum?k.push({path:e,property:"maximum",message:this.translate("error_maximum_excl",[a.maximum])}):!a.exclusiveMaximum&&b>a.maximum&&k.push({path:e,property:"maximum",message:this.translate("error_maximum_incl",[a.maximum])})),a.hasOwnProperty("minimum")&&(a.exclusiveMinimum&&b<=a.minimum?k.push({path:e,property:"minimum",message:this.translate("error_minimum_excl",[a.minimum])}):!a.exclusiveMinimum&&b<a.minimum&&k.push({path:e,property:"minimum",message:this.translate("error_minimum_incl",[a.minimum])}));else if("string"==typeof b)a.maxLength&&(b+"").length>a.maxLength&&k.push({path:e,property:"maxLength",message:this.translate("error_maxLength",[a.maxLength])}),a.minLength&&(b+"").length<a.minLength&&k.push({path:e,property:"minLength",message:this.translate(1===a.minLength?"error_notempty":"error_minLength",[a.minLength])}),a.pattern&&(new RegExp(a.pattern).test(b)||k.push({path:e,property:"pattern",message:this.translate("error_pattern")}));else if("object"==typeof b&&null!==b&&Array.isArray(b)){if(a.items)if(Array.isArray(a.items))for(h=0;h<b.length;h++)if(a.items[h])k=k.concat(this._validateSchema(a.items[h],b[h],e+"."+h));else{if(a.additionalItems===!0)break;if(!a.additionalItems){if(a.additionalItems===!1){k.push({path:e,property:"additionalItems",message:this.translate("error_additionalItems")});break}break}k=k.concat(this._validateSchema(a.additionalItems,b[h],e+"."+h))}else for(h=0;h<b.length;h++)k=k.concat(this._validateSchema(a.items,b[h],e+"."+h));if(a.maxItems&&b.length>a.maxItems&&k.push({path:e,property:"maxItems",message:this.translate("error_maxItems",[a.maxItems])}),a.minItems&&b.length<a.minItems&&k.push({path:e,property:"minItems",message:this.translate("error_minItems",[a.minItems])}),a.uniqueItems){var o={};for(h=0;h<b.length;h++){if(g=JSON.stringify(b[h]),o[g]){k.push({path:e,property:"uniqueItems",message:this.translate("error_uniqueItems")});break}o[g]=!0}}}else if("object"==typeof b&&null!==b){if(a.maxProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g>a.maxProperties&&k.push({path:e,property:"maxProperties",message:this.translate("error_maxProperties",[a.maxProperties])})}if(a.minProperties){g=0;for(h in b)b.hasOwnProperty(h)&&g++;g<a.minProperties&&k.push({path:e,property:"minProperties",message:this.translate("error_minProperties",[a.minProperties])})}if(a.required&&Array.isArray(a.required))for(h=0;h<a.required.length;h++)"undefined"==typeof b[a.required[h]]&&k.push({path:e,property:"required",message:this.translate("error_required",[a.required[h]])});var p={};if(a.properties)for(h in a.properties)a.properties.hasOwnProperty(h)&&(p[h]=!0,k=k.concat(this._validateSchema(a.properties[h],b[h],e+"."+h)));if(a.patternProperties)for(h in a.patternProperties)if(a.patternProperties.hasOwnProperty(h)){var q=new RegExp(h);for(i in b)b.hasOwnProperty(i)&&q.test(i)&&(p[i]=!0,k=k.concat(this._validateSchema(a.patternProperties[h],b[i],e+"."+i)))}if("undefined"!=typeof a.additionalProperties||!this.jsoneditor.options.no_additional_properties||a.oneOf||a.anyOf||(a.additionalProperties=!1),"undefined"!=typeof a.additionalProperties)for(h in b)if(b.hasOwnProperty(h)&&!p[h]){if(!a.additionalProperties){k.push({path:e,property:"additionalProperties",message:this.translate("error_additional_properties",[h])});break}if(a.additionalProperties===!0)break;k=k.concat(this._validateSchema(a.additionalProperties,b[h],e+"."+h))}if(a.dependencies)for(h in a.dependencies)if(a.dependencies.hasOwnProperty(h)&&"undefined"!=typeof b[h])if(Array.isArray(a.dependencies[h]))for(i=0;i<a.dependencies[h].length;i++)"undefined"==typeof b[a.dependencies[h][i]]&&k.push({path:e,property:"dependencies",message:this.translate("error_dependency",[a.dependencies[h][i]])});else k=k.concat(this._validateSchema(a.dependencies[h],b,e))}return d(f.defaults.custom_validators,function(c,d){k=k.concat(d.call(j,a,b,e))}),k},_checkType:function(a,b){return"string"==typeof a?"string"===a?"string"==typeof b:"number"===a?"number"==typeof b:"integer"===a?"number"==typeof b&&b===Math.floor(b):"boolean"===a?"boolean"==typeof b:"array"===a?Array.isArray(b):"object"===a?null!==b&&!Array.isArray(b)&&"object"==typeof b:"null"===a?null===b:!0:!this._validateSchema(a,b).length}}),f.AbstractEditor=a.extend({onChildEditorChange:function(a){this.onChange(!0)},notify:function(){this.jsoneditor.notifyWatchers(this.path)},change:function(){this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange()},onChange:function(a){this.notify(),this.watch_listener&&this.watch_listener(),a&&this.change()},register:function(){this.jsoneditor.registerEditor(this),this.onChange()},unregister:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)},getNumColumns:function(){return 12},init:function(a){this.jsoneditor=a.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.original_schema=a.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.options=c({},this.options||{},a.schema.options||{},a),a.path||this.schema.id||(this.schema.id="root"),this.path=a.path||"root",this.formname=a.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.jsoneditor.options.form_name_root&&(this.formname=this.formname.replace(/^root\[/,this.jsoneditor.options.form_name_root+"[")),this.key=this.path.split(".").pop(),this.parent=a.parent,this.link_watchers=[],a.container&&this.setContainer(a.container)},setContainer:function(a){this.container=a,this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)},preBuild:function(){},build:function(){},postBuild:function(){this.setupWatchListeners(),this.addLinks(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.register(),this.onWatchedFieldChange()},setupWatchListeners:function(){var a=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){a.refreshWatchedFieldValues()&&a.onWatchedFieldChange()},this.register(),this.schema.hasOwnProperty("watch")){var b,c,d,e,f;for(var g in this.schema.watch)if(this.schema.watch.hasOwnProperty(g)){if(b=this.schema.watch[g],Array.isArray(b)?c=[b[0]].concat(b[1].split(".")):(c=b.split("."),a.theme.closest(a.container,'[data-schemaid="'+c[0]+'"]')||c.unshift("#")),d=c.shift(),"#"===d&&(d=a.jsoneditor.schema.id||"root"),e=a.theme.closest(a.container,'[data-schemaid="'+d+'"]'),!e)throw"Could not find ancestor node with id "+d;f=e.getAttribute("data-schemapath")+"."+c.join("."),a.jsoneditor.watch(f,a.watch_listener),a.watched[g]=f}}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))},addLinks:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.container.appendChild(this.link_holder),this.schema.links))for(var a=0;a<this.schema.links.length;a++)this.addLink(this.getLink(this.schema.links[a]))},getButton:function(a,b,c){var d="json-editor-btn-"+b;b=this.iconlib?this.iconlib.getIcon(b):null,!b&&c&&(a=c,c=null);var e=this.theme.getButton(a,b,c);return e.className+=" "+d+" ",e},setButtonText:function(a,b,c,d){return c=this.iconlib?this.iconlib.getIcon(c):null,!c&&d&&(b=d,d=null),this.theme.setButtonText(a,b,c,d)},addLink:function(a){this.link_holder&&this.link_holder.appendChild(a)},getLink:function(a){var b,c,d=a.mediaType||"application/javascript",e=d.split("/")[0],f=this.jsoneditor.compileTemplate(a.href,this.template_engine);if("image"===e){b=this.theme.getBlockLinkHolder(),c=document.createElement("a"),c.setAttribute("target","_blank");var g=document.createElement("img");this.theme.createImageLink(b,c,g),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.setAttribute("title",a.rel||d),g.setAttribute("src",d)})}else if(["audio","video"].indexOf(e)>=0){b=this.theme.getBlockLinkHolder(),c=this.theme.getBlockLink(),c.setAttribute("target","_blank");var h=document.createElement(e);h.setAttribute("controls","controls"),this.theme.createMediaLink(b,c,h),this.link_watchers.push(function(b){var d=f(b);c.setAttribute("href",d),c.textContent=a.rel||d,h.setAttribute("src",d)})}else b=this.theme.getBlockLink(),b.setAttribute("target","_blank"),b.textContent=a.rel,this.link_watchers.push(function(c){var d=f(c);b.setAttribute("href",d),b.textContent=a.rel||d});return b},refreshWatchedFieldValues:function(){if(this.watched_values){var a={},b=!1,c=this;if(this.watched){var d,e;for(var f in this.watched)this.watched.hasOwnProperty(f)&&(e=c.jsoneditor.getEditor(this.watched[f]),d=e?e.getValue():null,c.watched_values[f]!==d&&(b=!0),a[f]=d)}return a.self=this.getValue(),this.watched_values.self!==a.self&&(b=!0),this.watched_values=a,b}},getWatchedFieldValues:function(){return this.watched_values},updateHeaderText:function(){if(this.header)if(this.header.children.length){for(var a=0;a<this.header.childNodes.length;a++)if(3===this.header.childNodes[a].nodeType){this.header.childNodes[a].nodeValue=this.getHeaderText();break}}else this.header.textContent=this.getHeaderText()},getHeaderText:function(a){return this.header_text?this.header_text:a?this.schema.title:this.getTitle()},onWatchedFieldChange:function(){var a;if(this.header_template){a=c(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()});var b=this.header_template(a);b!==this.header_text&&(this.header_text=b,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){a=this.getWatchedFieldValues();for(var d=0;d<this.link_watchers.length;d++)this.link_watchers[d](a)}},setValue:function(a){this.value=a},getValue:function(){return this.value},refreshValue:function(){},getChildEditors:function(){return!1},destroy:function(){var a=this;this.unregister(this),d(this.watched,function(b,c){a.jsoneditor.unwatch(c,a.watch_listener)}),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null},getDefault:function(){if(this.schema["default"])return this.schema["default"];if(this.schema["enum"])return this.schema["enum"][0];var a=this.schema.type||this.schema.oneOf;if(a&&Array.isArray(a)&&(a=a[0]),a&&"object"==typeof a&&(a=a.type),a&&Array.isArray(a)&&(a=a[0]),"string"==typeof a){if("number"===a)return 0;if("boolean"===a)return!1;if("integer"===a)return 0;if("string"===a)return"";if("object"===a)return{};if("array"===a)return[]}return null},getTitle:function(){return this.schema.title||this.key},enable:function(){this.disabled=!1},disable:function(){this.disabled=!0},isEnabled:function(){return!this.disabled},isRequired:function(){return"boolean"==typeof this.schema.required?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.indexOf(this.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},getDisplayText:function(a){var b=[],c={};d(a,function(a,b){b.title&&(c[b.title]=c[b.title]||0,c[b.title]++),b.description&&(c[b.description]=c[b.description]||0,c[b.description]++),b.format&&(c[b.format]=c[b.format]||0,c[b.format]++),b.type&&(c[b.type]=c[b.type]||0,c[b.type]++)}),d(a,function(a,d){var e;e="string"==typeof d?d:d.title&&c[d.title]<=1?d.title:d.format&&c[d.format]<=1?d.format:d.type&&c[d.type]<=1?d.type:d.description&&c[d.description]<=1?d.descripton:d.title?d.title:d.format?d.format:d.type?d.type:d.description?d.description:JSON.stringify(d).length<50?JSON.stringify(d):"type",b.push(e)});var e={};return d(b,function(a,d){e[d]=e[d]||0,e[d]++,c[d]>1&&(b[a]=d+" "+e[d])}),b},getOption:function(a){try{throw"getOption is deprecated"}catch(b){window.console.error(b)}return this.options[a]},showValidationErrors:function(a){}}),f.defaults.editors["null"]=f.AbstractEditor.extend({getValue:function(){return null},setValue:function(){this.onChange()},getNumColumns:function(){return 2}}),f.defaults.editors.string=f.AbstractEditor.extend({register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},setValue:function(a,b,c){if((!this.template||c)&&(null===a||"undefined"==typeof a?a="":"object"==typeof a?a=JSON.stringify(a):"string"!=typeof a&&(a=""+a),a!==this.serialized)){var d=this.sanitize(a);if(this.input.value!==d){this.input.value=d,this.sceditor_instance?this.sceditor_instance.val(d):this.epiceditor?this.epiceditor.importFile(null,d):this.ace_editor&&this.ace_editor.setValue(d);var e=c||this.getValue()!==a;this.refreshValue(),b?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(e)}}},getNumColumns:function(){var a,b=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return a="textarea"===this.input_type?6:["text","email"].indexOf(this.input_type)>=0?4:2,Math.min(12,Math.max(b,a))},build:function(){var a=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var b=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,b+1),d=1;this.schema.multipleOf&&(b%this.schema.multipleOf&&(b=Math.ceil(b/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),d=this.schema.multipleOf),this.input=this.theme.getRangeInput(b,c,d)}else["actionscript","batchfile","bbcode","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","markdown","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","r","ruby","sass","scala","scss","smarty","sql","stylus","svg","twig","vbscript","xml","yaml"].indexOf(this.format)>=0?(this.input_type=this.format,this.source_code=!0,this.input=this.theme.getTextareaInput()):(this.input_type=this.format,this.input=this.theme.getFormInputField(this.input_type));else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);"undefined"!=typeof this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),"undefined"!=typeof this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):"undefined"!=typeof this.schema.minLength&&this.input.setAttribute("pattern",".{"+this.schema.minLength+",}"),this.options.compact?this.container.className+=" compact":this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),a.schema.template)return void(this.value=a.value);var c=this.value,d=a.sanitize(c);c!==d&&(this.value=d),a.is_dirty=!0,a.refreshValue(),a.onChange(!0)}),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(a){if(a){var b,c=a.offsetHeight;if(a.offsetHeight<a.scrollHeight)for(b=0;a.offsetHeight<a.scrollHeight+3&&!(b>100);)b++,c++,a.style.height=c+"px";else{for(b=0;a.offsetHeight>=a.scrollHeight+3&&!(b>100);)b++,c--,a.style.height=c+"px";a.style.height=c+1+"px"}}},this.input.addEventListener("keyup",function(b){a.adjust_height(this)}),this.input.addEventListener("change",function(b){a.adjust_height(this)}),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),window.requestAnimationFrame(function(){a.input.parentNode&&a.afterInputReady(),a.adjust_height&&a.adjust_height(a.input)}),this.schema.template?(this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()):this.refreshValue()},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},afterInputReady:function(){var a,b=this;if(this.source_code)if(this.options.wysiwyg&&["html","bbcode"].indexOf(this.input_type)>=0&&window.jQuery&&window.jQuery.fn&&window.jQuery.fn.sceditor)a=c({},{plugins:"html"===b.input_type?"xhtml":"bbcode",emoticonsEnabled:!1,width:"100%",height:300},f.plugins.sceditor,b.options.sceditor_options||{}),window.jQuery(b.input).sceditor(a),b.sceditor_instance=window.jQuery(b.input).sceditor("instance"),b.sceditor_instance.blur(function(){var a=window.jQuery("<div>"+b.sceditor_instance.val()+"</div>");window.jQuery("#sceditor-start-marker,#sceditor-end-marker,.sceditor-nlf",a).remove(),b.input.value=a.html(),b.value=b.input.value,b.is_dirty=!0,b.onChange(!0)});else if("markdown"===this.input_type&&window.EpicEditor)this.epiceditor_container=document.createElement("div"),this.input.parentNode.insertBefore(this.epiceditor_container,this.input),this.input.style.display="none",a=c({},f.plugins.epiceditor,{container:this.epiceditor_container,clientSideStorage:!1}),this.epiceditor=new window.EpicEditor(a).load(),this.epiceditor.importFile(null,this.getValue()),this.epiceditor.on("update",function(){var a=b.epiceditor.exportFile();b.input.value=a,b.value=a,b.is_dirty=!0,b.onChange(!0);\r
+});else if(window.ace){var d=this.input_type;("cpp"===d||"c++"===d||"c"===d)&&(d="c_cpp"),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.ace_container.style.height="400px",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor=window.ace.edit(this.ace_container),this.ace_editor.setValue(this.getValue()),f.plugins.ace.theme&&this.ace_editor.setTheme("ace/theme/"+f.plugins.ace.theme),d=window.ace.require("ace/mode/"+d),d&&this.ace_editor.getSession().setMode(new d.Mode),this.ace_editor.on("change",function(){var a=b.ace_editor.getValue();b.input.value=a,b.refreshValue(),b.is_dirty=!0,b.onChange(!0)})}b.theme.afterInputReady(b.input)},refreshValue:function(){this.value=this.input.value,"string"!=typeof this.value&&(this.value=""),this.serialized=this.value},destroy:function(){this.sceditor_instance?this.sceditor_instance.destroy():this.epiceditor?this.epiceditor.unload():this.ace_editor&&this.ace_editor.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this._super()},sanitize:function(a){return a},onWatchedFieldChange:function(){var a;this.template&&(a=this.getWatchedFieldValues(),this.setValue(this.template(a),!1,!0)),this._super()},showValidationErrors:function(a){var b=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var c=[];d(a,function(a,d){d.path===b.path&&c.push(d.message)}),c.length?this.theme.addInputError(this.input,c.join(". ")+"."):this.theme.removeInputError(this.input)}}),f.defaults.editors.number=f.defaults.editors.string.extend({sanitize:function(a){return(a+"").replace(/[^0-9\.\-eE]/g,"")},getNumColumns:function(){return 2},getValue:function(){return 1*this.value}}),f.defaults.editors.integer=f.defaults.editors.number.extend({sanitize:function(a){return a+="",a.replace(/[^0-9\-]/g,"")},getNumColumns:function(){return 2}}),f.defaults.editors.object=f.AbstractEditor.extend({getDefault:function(){return c({},this.schema["default"]||{})},getChildEditors:function(){return this.editors},register:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].register()},unregister:function(){if(this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.maxwidth),3)},enable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].enable()},disable:function(){if(this.editjson_button&&(this.editjson_button.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),this._super(),this.editors)for(var a in this.editors)this.editors.hasOwnProperty(a)&&this.editors[a].disable()},layoutEditors:function(){var a,b,c=this;if(this.row_container){this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(a,b){var d=c.editors[a].schema.propertyOrder,e=c.editors[b].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e});var e;if("grid"===this.format){var f=[];for(d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){for(var e=!1,g=d.options.hidden?0:d.options.grid_columns||d.getNumColumns(),h=d.options.hidden?0:d.container.offsetHeight,i=0;i<f.length;i++)f[i].width+g<=12&&(!h||.5*f[i].minh<h&&2*f[i].maxh>h)&&(e=i);e===!1&&(f.push({width:0,minh:999999,maxh:0,editors:[]}),e=f.length-1),f[e].editors.push({key:b,width:g,height:h}),f[e].width+=g,f[e].minh=Math.min(f[e].minh,h),f[e].maxh=Math.max(f[e].maxh,h)}}),a=0;a<f.length;a++)if(f[a].width<12){var g=!1,h=0;for(b=0;b<f[a].editors.length;b++)g===!1?g=b:f[a].editors[b].width>f[a].editors[g].width&&(g=b),f[a].editors[b].width*=12/f[a].width,f[a].editors[b].width=Math.floor(f[a].editors[b].width),h+=f[a].editors[b].width;12>h&&(f[a].editors[g].width+=12-h),f[a].width=12}if(this.layout===JSON.stringify(f))return!1;for(this.layout=JSON.stringify(f),e=document.createElement("div"),a=0;a<f.length;a++){var i=this.theme.getGridRow();for(e.appendChild(i),b=0;b<f[a].editors.length;b++){var j=f[a].editors[b].key,k=this.editors[j];k.options.hidden?k.container.style.display="none":this.theme.setGridColumnSize(k.container,f[a].editors[b].width),i.appendChild(k.container)}}}else e=document.createElement("div"),d(this.property_order,function(a,b){var d=c.editors[b];if(!d.property_removed){var f=c.theme.getGridRow();e.appendChild(f),d.options.hidden?d.container.style.display="none":c.theme.setGridColumnSize(d.container,12),f.appendChild(d.container)}});this.row_container.innerHTML="",this.row_container.appendChild(e)}},getPropertySchema:function(a){var b=this.schema.properties[a]||{};b=c({},b);var d=this.schema.properties[a]?!0:!1;if(this.schema.patternProperties)for(var e in this.schema.patternProperties)if(this.schema.patternProperties.hasOwnProperty(e)){var f=new RegExp(e);f.test(a)&&(b.allOf=b.allOf||[],b.allOf.push(this.schema.patternProperties[e]),d=!0)}return!d&&this.schema.additionalProperties&&"object"==typeof this.schema.additionalProperties&&(b=c({},this.schema.additionalProperties)),b},preBuild:function(){this._super(),this.editors={},this.cached_editors={};var a=this;if(this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)d(this.schema.properties,function(b,c){var d=a.jsoneditor.getEditorClass(c);a.editors[b]=a.jsoneditor.createEditor(d,{jsoneditor:a.jsoneditor,schema:c,path:a.path+"."+b,parent:a,compact:!0,required:!0}),a.editors[b].preBuild();var e=a.editors[b].options.hidden?0:a.editors[b].options.grid_columns||a.editors[b].getNumColumns();a.minwidth+=e,a.maxwidth+=e}),this.no_link_holder=!0;else{if(this.options.table)throw"Not supported yet";this.defaultProperties=this.schema.defaultProperties||Object.keys(this.schema.properties),a.maxwidth+=1,d(this.defaultProperties,function(b,c){a.addObjectProperty(c,!0),a.editors[c]&&(a.minwidth=Math.max(a.minwidth,a.editors[c].options.grid_columns||a.editors[c].getNumColumns()),a.maxwidth+=a.editors[c].options.grid_columns||a.editors[c].getNumColumns())})}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort(function(b,c){var d=a.editors[b].schema.propertyOrder,e=a.editors[c].schema.propertyOrder;return"number"!=typeof d&&(d=1e3),"number"!=typeof e&&(e=1e3),d-e})},build:function(){var a=this;if(this.options.table_row)this.editor_holder=this.container,d(this.editors,function(b,c){var d=a.theme.getTableCell();a.editor_holder.appendChild(d),c.setContainer(d),c.build(),c.postBuild(),a.editors[b].options.hidden&&(d.style.display="none"),a.editors[b].options.input_width&&(d.style.width=a.editors[b].options.input_width)});else{if(this.options.table)throw"Not supported yet";this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header),this.container.appendChild(this.title),this.container.style.position="relative",this.editjson_holder=this.theme.getModal(),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.style.height="170px",this.editjson_textarea.style.width="300px",this.editjson_textarea.style.display="block",this.editjson_save=this.getButton("Save","save","Save"),this.editjson_save.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.saveJSON()}),this.editjson_cancel=this.getButton("Cancel","cancel","Cancel"),this.editjson_cancel.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.hideEditJSON()}),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.style.width="295px",this.addproperty_list.style.maxHeight="160px",this.addproperty_list.style.padding="5px 0",this.addproperty_list.style.overflowY="auto",this.addproperty_list.style.overflowX="hidden",this.addproperty_list.style.paddingLeft="5px",this.addproperty_list.setAttribute("class","property-selector"),this.addproperty_add=this.getButton("add","add","add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input.style.width="220px",this.addproperty_input.style.marginBottom="0",this.addproperty_input.style.display="inline-block",this.addproperty_add.addEventListener("click",function(b){if(b.preventDefault(),b.stopPropagation(),a.addproperty_input.value){if(a.editors[a.addproperty_input.value])return void window.alert("there is already a property with that name");a.addObjectProperty(a.addproperty_input.value),a.editors[a.addproperty_input.value]&&a.editors[a.addproperty_input.value].disable(),a.onChange(!0)}}),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var b=document.createElement("div");b.style.clear="both",this.addproperty_holder.appendChild(b),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.editor_holder.style.paddingBottom="0",this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),this.editor_holder.appendChild(this.row_container),d(this.editors,function(b,c){var d=a.theme.getGridColumn();a.row_container.appendChild(d),c.setContainer(d),c.build(),c.postBuild()}),this.title_controls=this.theme.getHeaderButtonHolder(),this.editjson_controls=this.theme.getHeaderButtonHolder(),this.addproperty_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.title.appendChild(this.editjson_controls),this.title.appendChild(this.addproperty_controls),this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.editor_holder.style.display="",a.collapsed=!1,a.setButtonText(a.toggle_button,"","collapse","Collapse")):(a.editor_holder.style.display="none",a.collapsed=!0,a.setButtonText(a.toggle_button,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.editjson_button=this.getButton("JSON","edit","Edit JSON"),this.editjson_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.toggleEditJSON()}),this.editjson_controls.appendChild(this.editjson_button),this.editjson_controls.appendChild(this.editjson_holder),this.schema.options&&"undefined"!=typeof this.schema.options.disable_edit_json?this.schema.options.disable_edit_json&&(this.editjson_button.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_button.style.display="none"),this.addproperty_button=this.getButton("Properties","edit","Object Properties"),this.addproperty_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.toggleAddProperty()}),this.addproperty_controls.appendChild(this.addproperty_button),this.addproperty_controls.appendChild(this.addproperty_holder),this.refreshAddProperties()}this.options.table_row?(this.editor_holder=this.container,d(this.property_order,function(b,c){a.editor_holder.appendChild(a.editors[c].container)})):(this.layoutEditors(),this.layoutEditors())},showEditJSON:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left=this.editjson_button.offsetLeft+"px",this.editjson_holder.style.top=this.editjson_button.offsetTop+this.editjson_button.offsetHeight+"px",this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_button.disabled=!1,this.editing_json=!0)},hideEditJSON:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)},saveJSON:function(){if(this.editjson_holder)try{var a=JSON.parse(this.editjson_textarea.value);this.setValue(a),this.hideEditJSON()}catch(b){throw window.alert("invalid JSON"),b}},toggleEditJSON:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()},insertPropertyControlUsingPropertyOrder:function(a,b,c){var d;this.schema.properties[a]&&(d=this.schema.properties[a].propertyOrder),"number"!=typeof d&&(d=1e3),b.propertyOrder=d;for(var e=0;e<c.childNodes.length;e++){var f=c.childNodes[e];if(b.propertyOrder<f.propertyOrder){this.addproperty_list.insertBefore(b,f),b=null;break}}b&&this.addproperty_list.appendChild(b)},addPropertyCheckbox:function(a){var b,c,d,e,f=this;return b=f.theme.getCheckbox(),b.style.width="auto",d=this.schema.properties[a]&&this.schema.properties[a].title?this.schema.properties[a].title:a,c=f.theme.getCheckboxLabel(d),e=f.theme.getFormControl(c,b),e.style.paddingBottom=e.style.marginBottom=e.style.paddingTop=e.style.marginTop=0,e.style.height="auto",this.insertPropertyControlUsingPropertyOrder(a,e,this.addproperty_list),b.checked=a in this.editors,b.addEventListener("change",function(){b.checked?f.addObjectProperty(a):f.removeObjectProperty(a),f.onChange(!0)}),f.addproperty_checkboxes[a]=b,b},showAddProperty:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left=this.addproperty_button.offsetLeft+"px",this.addproperty_holder.style.top=this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight+"px",this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())},hideAddProperty:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)},toggleAddProperty:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()},removeObjectProperty:function(a){this.editors[a]&&(this.editors[a].unregister(),delete this.editors[a],this.refreshValue(),this.layoutEditors())},addObjectProperty:function(a,b){var c=this;if(!this.editors[a]){if(this.cached_editors[a]){if(this.editors[a]=this.cached_editors[a],b)return;this.editors[a].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[a]))return;var d=c.getPropertySchema(a),e=c.jsoneditor.getEditorClass(d);if(c.editors[a]=c.jsoneditor.createEditor(e,{jsoneditor:c.jsoneditor,schema:d,path:c.path+"."+a,parent:c}),c.editors[a].preBuild(),!b){var f=c.theme.getChildEditorHolder();c.editor_holder.appendChild(f),c.editors[a].setContainer(f),c.editors[a].build(),c.editors[a].postBuild()}c.cached_editors[a]=c.editors[a]}b||(c.refreshValue(),c.layoutEditors())}},onChildEditorChange:function(a){this.refreshValue(),this._super(a)},canHaveAdditionalProperties:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!this.jsoneditor.options.no_additional_properties},destroy:function(){d(this.cached_editors,function(a,b){b.destroy()}),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,this._super()},getValue:function(){var a=this._super();if(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)for(var b in a)a.hasOwnProperty(b)&&(a[b]||delete a[b]);return a},refreshValue:function(){this.value={};for(var a in this.editors)this.editors.hasOwnProperty(a)&&(this.value[a]=this.editors[a].getValue());this.adding_property&&this.refreshAddProperties()},refreshAddProperties:function(){if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)return void(this.addproperty_controls.style.display="none");var a,b=!1,c=!1,d=0,e=!1;for(a in this.editors)this.editors.hasOwnProperty(a)&&d++;b=this.canHaveAdditionalProperties()&&!("undefined"!=typeof this.schema.maxProperties&&d>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={};for(a in this.cached_editors)this.cached_editors.hasOwnProperty(a)&&(this.addPropertyCheckbox(a),this.isRequired(this.cached_editors[a])&&a in this.editors&&(this.addproperty_checkboxes[a].disabled=!0),"undefined"!=typeof this.schema.minProperties&&d<=this.schema.minProperties?(this.addproperty_checkboxes[a].disabled=this.addproperty_checkboxes[a].checked,this.addproperty_checkboxes[a].checked||(e=!0)):a in this.editors?(e=!0,c=!0):b||this.schema.properties.hasOwnProperty(a)?(this.addproperty_checkboxes[a].disabled=!1,e=!0):this.addproperty_checkboxes[a].disabled=!0);this.canHaveAdditionalProperties()&&(e=!0);for(a in this.schema.properties)this.schema.properties.hasOwnProperty(a)&&(this.cached_editors[a]||(e=!0,this.addPropertyCheckbox(a)));e?this.canHaveAdditionalProperties()?b?this.addproperty_add.disabled=!1:this.addproperty_add.disabled=!0:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_controls.style.display="none")},isRequired:function(a){return"boolean"==typeof a.schema.required?a.schema.required:Array.isArray(this.schema.required)?this.schema.required.indexOf(a.key)>-1:this.jsoneditor.options.required_by_default?!0:!1},setValue:function(a,b){var c=this;a=a||{},("object"!=typeof a||Array.isArray(a))&&(a={}),d(this.cached_editors,function(d,e){"undefined"!=typeof a[d]?(c.addObjectProperty(d),e.setValue(a[d],b)):b||c.isRequired(e)?e.setValue(e.getDefault(),b):c.removeObjectProperty(d)}),d(a,function(a,d){c.cached_editors[a]||(c.addObjectProperty(a),c.editors[a]&&c.editors[a].setValue(d,b))}),this.refreshValue(),this.layoutEditors(),this.onChange()},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";this.options.table_row&&(c.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),d(this.editors,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.array=f.AbstractEditor.extend({getDefault:function(){return this.schema["default"]||[]},register:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].register()},unregister:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].unregister()},getNumColumns:function(){var a=this.getItemInfo(0);return this.tabs_holder?Math.max(Math.min(12,a.width+2),4):a.width},enable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!1),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!1),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!1),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].enable(),this.rows[a].moveup_button&&(this.rows[a].moveup_button.disabled=!1),this.rows[a].movedown_button&&(this.rows[a].movedown_button.disabled=!1),this.rows[a].delete_button&&(this.rows[a].delete_button.disabled=!1);this._super()},disable:function(){if(this.add_row_button&&(this.add_row_button.disabled=!0),this.remove_all_rows_button&&(this.remove_all_rows_button.disabled=!0),this.delete_last_row_button&&(this.delete_last_row_button.disabled=!0),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].disable(),this.rows[a].moveup_button&&(this.rows[a].moveup_button.disabled=!0),this.rows[a].movedown_button&&(this.rows[a].movedown_button.disabled=!0),this.rows[a].delete_button&&(this.rows[a].delete_button.disabled=!0);this._super()},preBuild:function(){this._super(),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add},build:function(){this.options.compact?(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),"tabs"===this.schema.format?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls))),this.addControls()},onChildEditorChange:function(a){this.refreshValue(),this.refreshTabs(!0),this._super(a)},getItemTitle:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var a=this.jsoneditor.expandRefs(this.schema.items);this.item_title=a.title||"item"}else this.item_title="item";return this.item_title},getItemSchema:function(a){return Array.isArray(this.schema.items)?a>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?c({},this.schema.additionalItems):void 0:c({},this.schema.items[a]):this.schema.items?c({},this.schema.items):{}},getItemInfo:function(a){var b=this.getItemSchema(a);this.item_info=this.item_info||{};var c=JSON.stringify(b);return"undefined"!=typeof this.item_info[c]?this.item_info[c]:(b=this.jsoneditor.expandRefs(b),this.item_info[c]={title:b.title||"item","default":b["default"],width:12,child_editors:b.properties||b.items},this.item_info[c])},getElementEditor:function(a){var b=this.getItemInfo(a),c=this.getItemSchema(a);c=this.jsoneditor.expandRefs(c),c.title=b.title+" "+(a+1);var d,e=this.jsoneditor.getEditorClass(c);d=this.tabs_holder?this.theme.getTabContent():b.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(d);var f=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:c,container:d,path:this.path+"."+a,parent:this,required:!0});return f.preBuild(),f.build(),f.postBuild(),f.title_controls||(f.array_controls=this.theme.getButtonHolder(),d.appendChild(f.array_controls)),f},destroy:function(){this.empty(!0),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.controls&&this.controls.parentNode&&this.controls.parentNode.removeChild(this.controls),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,this._super()},empty:function(a){if(this.rows){var b=this;d(this.rows,function(c,d){a&&(d.tab&&d.tab.parentNode&&d.tab.parentNode.removeChild(d.tab),b.destroyRow(d,!0),b.row_cache[c]=null),b.rows[c]=null}),b.rows=[],a&&(b.row_cache=[])}},destroyRow:function(a,b){var c=a.container;b?(a.destroy(),c.parentNode&&c.parentNode.removeChild(c),a.tab&&a.tab.parentNode&&a.tab.parentNode.removeChild(a.tab)):(a.tab&&(a.tab.style.display="none"),c.style.display="none",a.unregister())},getMax:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0},refreshTabs:function(a){var b=this;d(this.rows,function(c,d){d.tab&&(a?d.tab_text.textContent=d.getHeaderText():d.tab===b.active_tab?(b.theme.markTabActive(d.tab),d.container.style.display=""):(b.theme.markTabInactive(d.tab),d.container.style.display="none"))})},setValue:function(a,b){a=a||[],Array.isArray(a)||(a=[a]);var c=JSON.stringify(a);if(c!==this.serialized){if(this.schema.minItems)for(;a.length<this.schema.minItems;)a.push(this.getItemInfo(a.length)["default"]);this.getMax()&&a.length>this.getMax()&&(a=a.slice(0,this.getMax()));var e=this;d(a,function(a,c){e.rows[a]?e.rows[a].setValue(c,b):e.row_cache[a]?(e.rows[a]=e.row_cache[a],e.rows[a].setValue(c,b),e.rows[a].container.style.display="",e.rows[a].tab&&(e.rows[a].tab.style.display=""),e.rows[a].register()):e.addRow(c,b)});for(var f=a.length;f<e.rows.length;f++)e.destroyRow(e.rows[f]),e.rows[f]=null;e.rows=e.rows.slice(0,a.length);var g=null;d(e.rows,function(a,b){return b.tab===e.active_tab?(g=b.tab,!1):void 0}),!g&&e.rows.length&&(g=e.rows[0].tab),e.active_tab=g,e.refreshValue(b),e.refreshTabs(!0),e.refreshTabs(),e.onChange()}},refreshValue:function(a){var b=this,c=this.value?this.value.length:0;if(this.value=[],d(this.rows,function(a,c){b.value[a]=c.getValue()}),c!==this.value.length||a){var e=this.schema.minItems&&this.schema.minItems>=this.rows.length;d(this.rows,function(a,c){c.movedown_button&&(a===b.rows.length-1?c.movedown_button.style.display="none":c.movedown_button.style.display=""),c.delete_button&&(e?c.delete_button.style.display="none":c.delete_button.style.display=""),b.value[a]=c.getValue()});var f=!1;this.value.length?1===this.value.length?(this.remove_all_rows_button.style.display="none",e||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",f=!0)):e||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",f=!0):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"),this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",f=!0),!this.collapsed&&f?this.controls.style.display="inline-block":this.controls.style.display="none"}},addRow:function(a,b){var c=this,e=this.rows.length;c.rows[e]=this.getElementEditor(e),c.row_cache[e]=c.rows[e],c.tabs_holder&&(c.rows[e].tab_text=document.createElement("span"),c.rows[e].tab_text.textContent=c.rows[e].getHeaderText(),c.rows[e].tab=c.theme.getTab(c.rows[e].tab_text),c.rows[e].tab.addEventListener("click",function(a){c.active_tab=c.rows[e].tab,c.refreshTabs(),a.preventDefault(),a.stopPropagation()}),c.theme.addTab(c.tabs_holder,c.rows[e].tab));var f=c.rows[e].title_controls||c.rows[e].array_controls;c.hide_delete_buttons||(c.rows[e].delete_button=this.getButton(c.getItemTitle(),"delete","Delete "+c.getItemTitle()),c.rows[e].delete_button.className+=" delete",c.rows[e].delete_button.setAttribute("data-i",e),c.rows[e].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),e=c.getValue(),f=[],g=null;d(e,function(a,d){return a===b?void(c.rows[a].tab===c.active_tab&&(c.rows[a+1]?g=c.rows[a].tab:a&&(g=c.rows[a-1].tab))):void f.push(d)}),c.setValue(f),g&&(c.active_tab=g,c.refreshTabs()),c.onChange(!0)}),f&&f.appendChild(c.rows[e].delete_button)),e&&!c.hide_move_buttons&&(c.rows[e].moveup_button=this.getButton("","moveup","Move up"),c.rows[e].moveup_button.className+=" moveup",c.rows[e].moveup_button.setAttribute("data-i",e),c.rows[e].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i");if(!(0>=b)){var d=c.getValue(),e=d[b-1];d[b-1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b-1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].moveup_button)),c.hide_move_buttons||(c.rows[e].movedown_button=this.getButton("","movedown","Move down"),c.rows[e].movedown_button.className+=" movedown",c.rows[e].movedown_button.setAttribute("data-i",e),c.rows[e].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var b=1*this.getAttribute("data-i"),d=c.getValue();if(!(b>=d.length-1)){var e=d[b+1];d[b+1]=d[b],d[b]=e,c.setValue(d),c.active_tab=c.rows[b+1].tab,c.refreshTabs(),c.onChange(!0)}}),f&&f.appendChild(c.rows[e].movedown_button)),a&&c.rows[e].setValue(a,b),c.refreshTabs()},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls.appendChild(this.toggle_button);var b=a.row_holder.style.display,c=a.controls.style.display;this.toggle_button.addEventListener("click",function(d){d.preventDefault(),d.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel&&(a.panel.style.display=""),a.row_holder.style.display=b,a.tabs_holder&&(a.tabs_holder.style.display=""),a.controls.style.display=c,a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.row_holder.style.display="none",a.tabs_holder&&(a.tabs_holder.style.display="none"),a.controls.style.display="none",a.panel&&(a.panel.style.display="none"),a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.rows.length;a.row_cache[c]?(a.rows[c]=a.row_cache[c],a.rows[c].setValue(a.rows[c].getDefault()),a.rows[c].container.style.display="",a.rows[c].tab&&(a.rows[c].tab.style.display=""),a.rows[c].register()):a.addRow(),a.active_tab=a.rows[c].tab,a.refreshTabs(),a.refreshValue(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),\r
+this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue(),d=null;a.rows.length>1&&a.rows[a.rows.length-1].tab===a.active_tab&&(d=a.rows[a.rows.length-2].tab),c.pop(),a.setValue(c),d&&(a.active_tab=d,a.refreshTabs()),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button),a.tabs&&(this.add_row_button.style.width="100%",this.add_row_button.style.textAlign="left",this.add_row_button.style.marginBottom="3px",this.delete_last_row_button.style.width="100%",this.delete_last_row_button.style.textAlign="left",this.delete_last_row_button.style.marginBottom="3px",this.remove_all_rows_button.style.width="100%",this.remove_all_rows_button.style.textAlign="left",this.remove_all_rows_button.style.marginBottom="3px")},showValidationErrors:function(a){var b=this,c=[],e=[];if(d(a,function(a,d){d.path===b.path?c.push(d):e.push(d)}),this.error_holder)if(c.length){this.error_holder.innerHTML="",this.error_holder.style.display="",d(c,function(a,c){b.error_holder.appendChild(b.theme.getErrorMessage(c.message))})}else this.error_holder.style.display="none";d(this.rows,function(a,b){b.showValidationErrors(e)})}}),f.defaults.editors.table=f.defaults.editors.array.extend({register:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].register()},unregister:function(){if(this._super(),this.rows)for(var a=0;a<this.rows.length;a++)this.rows[a].unregister()},getNumColumns:function(){return Math.max(Math.min(12,this.width),3)},preBuild:function(){var a=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=a.title||"row",this.item_default=a["default"]||null,this.item_has_child_editors=a.properties||a.items,this.width=12,this._super()},build:function(){var a=this;this.table=this.theme.getTable(),this.container.appendChild(this.table),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var b=this.getElementEditor(0,!0);if(this.item_default=b.getDefault(),this.width=b.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.title=this.theme.getHeader(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.schema.description),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.table),this.controls=this.theme.getButtonHolder(),this.panel.appendChild(this.controls),this.item_has_child_editors)for(var c=b.getChildEditors(),d=b.property_order||Object.keys(c),e=0;e<d.length;e++){var f=a.theme.getTableHeaderCell(c[d[e]].getTitle());c[d[e]].options.hidden&&(f.style.display="none"),a.header_row.appendChild(f)}else a.header_row.appendChild(a.theme.getTableHeaderCell(this.item_title));b.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=a.theme.getTableHeaderCell(" "),a.header_row.appendChild(this.controls_header_cell),this.addControls()},onChildEditorChange:function(a){this.refreshValue(),this._super()},getItemDefault:function(){return c({},{"default":this.item_default})["default"]},getItemTitle:function(){return this.item_title},getElementEditor:function(a,b){var d=c({},this.schema.items),e=this.jsoneditor.getEditorClass(d,this.jsoneditor),f=this.row_holder.appendChild(this.theme.getTableRow()),g=f;this.item_has_child_editors||(g=this.theme.getTableCell(),f.appendChild(g));var h=this.jsoneditor.createEditor(e,{jsoneditor:this.jsoneditor,schema:d,container:g,path:this.path+"."+a,parent:this,compact:!0,table_row:!0});return h.preBuild(),b||(h.build(),h.postBuild(),h.controls_cell=f.appendChild(this.theme.getTableCell()),h.row=f,h.table_controls=this.theme.getButtonHolder(),h.controls_cell.appendChild(h.table_controls),h.table_controls.style.margin=0,h.table_controls.style.padding=0),h},destroy:function(){this.innerHTML="",this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.row_holder&&this.row_holder.parentNode&&this.row_holder.parentNode.removeChild(this.row_holder),this.table&&this.table.parentNode&&this.table.parentNode.removeChild(this.table),this.panel&&this.panel.parentNode&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,this._super()},setValue:function(a,b){if(a=a||[],this.schema.minItems)for(;a.length<this.schema.minItems;)a.push(this.getItemDefault());this.schema.maxItems&&a.length>this.schema.maxItems&&(a=a.slice(0,this.schema.maxItems));var c=JSON.stringify(a);if(c!==this.serialized){var e=!1,f=this;d(a,function(a,b){f.rows[a]?f.rows[a].setValue(b):(f.addRow(b),e=!0)});for(var g=a.length;g<f.rows.length;g++){var h=f.rows[g].container;f.item_has_child_editors||f.rows[g].row.parentNode.removeChild(f.rows[g].row),f.rows[g].destroy(),h.parentNode&&h.parentNode.removeChild(h),f.rows[g]=null,e=!0}f.rows=f.rows.slice(0,a.length),f.refreshValue(),(e||b)&&f.refreshRowButtons(),f.onChange()}},refreshRowButtons:function(){var a=this,b=this.schema.minItems&&this.schema.minItems>=this.rows.length,c=!1;d(this.rows,function(d,e){e.movedown_button&&(d===a.rows.length-1?e.movedown_button.style.display="none":(c=!0,e.movedown_button.style.display="")),e.delete_button&&(b?e.delete_button.style.display="none":(c=!0,e.delete_button.style.display="")),e.moveup_button&&(c=!0)}),d(this.rows,function(a,b){c?b.controls_cell.style.display="":b.controls_cell.style.display="none"}),c?this.controls_header_cell.style.display="":this.controls_header_cell.style.display="none";var e=!1;this.value.length?1===this.value.length||this.hide_delete_buttons?(this.table.style.display="",this.remove_all_rows_button.style.display="none",b||this.hide_delete_buttons?this.delete_last_row_button.style.display="none":(this.delete_last_row_button.style.display="",e=!0)):(this.table.style.display="",b||this.hide_delete_buttons?(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none"):(this.delete_last_row_button.style.display="",this.remove_all_rows_button.style.display="",e=!0)):(this.delete_last_row_button.style.display="none",this.remove_all_rows_button.style.display="none",this.table.style.display="none"),this.schema.maxItems&&this.schema.maxItems<=this.rows.length||this.hide_add_button?this.add_row_button.style.display="none":(this.add_row_button.style.display="",e=!0),e?this.controls.style.display="":this.controls.style.display="none"},refreshValue:function(){var a=this;this.value=[],d(this.rows,function(b,c){a.value[b]=c.getValue()}),this.serialized=JSON.stringify(this.value)},addRow:function(a){var b=this,c=this.rows.length;b.rows[c]=this.getElementEditor(c);var e=b.rows[c].table_controls;this.hide_delete_buttons||(b.rows[c].delete_button=this.getButton("","delete","Delete"),b.rows[c].delete_button.className+=" delete",b.rows[c].delete_button.setAttribute("data-i",c),b.rows[c].delete_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),e=b.getValue(),f=[];d(e,function(a,b){a!==c&&f.push(b)}),b.setValue(f),b.onChange(!0)}),e.appendChild(b.rows[c].delete_button)),c&&!this.hide_move_buttons&&(b.rows[c].moveup_button=this.getButton("","moveup","Move up"),b.rows[c].moveup_button.className+=" moveup",b.rows[c].moveup_button.setAttribute("data-i",c),b.rows[c].moveup_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i");if(!(0>=c)){var d=b.getValue(),e=d[c-1];d[c-1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].moveup_button)),this.hide_move_buttons||(b.rows[c].movedown_button=this.getButton("","movedown","Move down"),b.rows[c].movedown_button.className+=" movedown",b.rows[c].movedown_button.setAttribute("data-i",c),b.rows[c].movedown_button.addEventListener("click",function(a){a.preventDefault(),a.stopPropagation();var c=1*this.getAttribute("data-i"),d=b.getValue();if(!(c>=d.length-1)){var e=d[c+1];d[c+1]=d[c],d[c]=e,b.setValue(d),b.onChange(!0)}}),e.appendChild(b.rows[c].movedown_button)),a&&b.rows[c].setValue(a)},addControls:function(){var a=this;this.collapsed=!1,this.toggle_button=this.getButton("","collapse","Collapse"),this.title_controls&&(this.title_controls.appendChild(this.toggle_button),this.toggle_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.collapsed?(a.collapsed=!1,a.panel.style.display="",a.setButtonText(this,"","collapse","Collapse")):(a.collapsed=!0,a.panel.style.display="none",a.setButtonText(this,"","expand","Expand"))}),this.options.collapsed&&e(this.toggle_button,"click"),this.schema.options&&"undefined"!=typeof this.schema.options.disable_collapse?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this.getButton(this.getItemTitle(),"add","Add "+this.getItemTitle()),this.add_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.addRow(),a.refreshValue(),a.refreshRowButtons(),a.onChange(!0)}),a.controls.appendChild(this.add_row_button),this.delete_last_row_button=this.getButton("Last "+this.getItemTitle(),"delete","Delete Last "+this.getItemTitle()),this.delete_last_row_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation();var c=a.getValue();c.pop(),a.setValue(c),a.onChange(!0)}),a.controls.appendChild(this.delete_last_row_button),this.remove_all_rows_button=this.getButton("All","delete","Delete All"),this.remove_all_rows_button.addEventListener("click",function(b){b.preventDefault(),b.stopPropagation(),a.setValue([]),a.onChange(!0)}),a.controls.appendChild(this.remove_all_rows_button)}}),f.defaults.editors.multiple=f.AbstractEditor.extend({register:function(){if(this.editors){for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].unregister();this.editors[this.type]&&this.editors[this.type].register()}this._super()},unregister:function(){if(this._super(),this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].unregister()},getNumColumns:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4},enable:function(){if(this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].enable();this.switcher.disabled=!1,this._super()},disable:function(){if(this.editors)for(var a=0;a<this.editors.length;a++)this.editors[a]&&this.editors[a].disable();this.switcher.disabled=!0,this._super()},switchEditor:function(a){var b=this;this.editors[a]||this.buildChildEditor(a),b.type=a,b.register();var c=b.getValue();d(b.editors,function(a,d){d&&(b.type===a?(b.keep_values&&d.setValue(c,!0),d.container.style.display=""):d.container.style.display="none")}),b.refreshValue(),b.refreshHeaderText()},buildChildEditor:function(a){var b=this,d=this.types[a],e=b.theme.getChildEditorHolder();b.editor_holder.appendChild(e);var f;"string"==typeof d?(f=c({},b.schema),f.type=d):(f=c({},b.schema,d),f=b.jsoneditor.expandRefs(f),d.required&&Array.isArray(d.required)&&b.schema.required&&Array.isArray(b.schema.required)&&(f.required=b.schema.required.concat(d.required)));var g=b.jsoneditor.getEditorClass(f);b.editors[a]=b.jsoneditor.createEditor(g,{jsoneditor:b.jsoneditor,schema:f,container:e,path:b.path,parent:b,required:!0}),b.editors[a].preBuild(),b.editors[a].build(),b.editors[a].postBuild(),b.editors[a].header&&(b.editors[a].header.style.display="none"),b.editors[a].option=b.switcher_options[a],e.addEventListener("change_header_text",function(){b.refreshHeaderText()}),a!==b.type&&(e.style.display="none")},preBuild:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,"undefined"!=typeof this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),"undefined"!=typeof this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,d(this.types,function(a,b){}),delete this.schema.oneOf;else{if(this.schema.type&&"any"!==this.schema.type)Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var a=this.schema.disallow;"object"==typeof a&&Array.isArray(a)||(a=[a]);var b=[];d(this.types,function(c,d){-1===a.indexOf(d)&&b.push(d)}),this.types=b}delete this.schema.type}this.display_text=this.getDisplayText(this.types)},build:function(){var a=this,b=this.container;this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.header),this.switcher=this.theme.getSwitcher(this.display_text),b.appendChild(this.switcher),this.switcher.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.switchEditor(a.display_text.indexOf(this.value)),a.onChange(!0)}),this.editor_holder=document.createElement("div"),b.appendChild(this.editor_holder),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),d(this.types,function(b,d){a.editors[b]=!1;var e;"string"==typeof d?(e=c({},a.schema),e.type=d):(e=c({},a.schema,d),d.required&&Array.isArray(d.required)&&a.schema.required&&Array.isArray(a.schema.required)&&(e.required=a.schema.required.concat(d.required))),a.validators[b]=new f.Validator(a.jsoneditor,e)}),this.switchEditor(0)},onChildEditorChange:function(a){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),this._super()},refreshHeaderText:function(){var a=this.getDisplayText(this.types);d(this.switcher_options,function(b,c){c.textContent=a[b]})},refreshValue:function(){this.value=this.editors[this.type].getValue()},setValue:function(a,b){var c=this;d(this.validators,function(b,d){return d.validate(a).length?void 0:(c.type=b,c.switcher.value=c.display_text[b],!1)}),this.switchEditor(this.type),this.editors[this.type].setValue(a,b),this.refreshValue(),c.onChange()},destroy:function(){d(this.editors,function(a,b){b&&b.destroy()}),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()},showValidationErrors:function(a){var b=this;this.oneOf?d(this.editors,function(e,f){if(f){var g=b.path+".oneOf["+e+"]",h=[];d(a,function(a,d){if(d.path.substr(0,g.length)===g){var e=c({},d);e.path=b.path+e.path.substr(g.length),h.push(e)}}),f.showValidationErrors(h)}}):d(this.editors,function(b,c){c&&c.showValidationErrors(a)})}}),f.defaults.editors["enum"]=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){this.container;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this["enum"]=this.schema["enum"],this.selected=0,this.select_options=[],this.html_values=[];for(var a=this,b=0;b<this["enum"].length;b++)this.select_options[b]=this.options.enum_titles[b]||"Value "+(b+1),this.html_values[b]=this.getHTML(this["enum"][b]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",function(){a.selected=a.select_options.indexOf(this.value),a.value=a["enum"][a.selected],a.refreshValue(),a.onChange(!0)}),this.value=this["enum"][0],this.refreshValue(),1===this["enum"].length&&(this.switcher.style.display="none")},refreshValue:function(){var a=this;a.selected=-1;var b=JSON.stringify(this.value);return d(this["enum"],function(c,d){return b===JSON.stringify(d)?(a.selected=c,!1):void 0}),a.selected<0?void a.setValue(a["enum"][0]):(this.switcher.value=this.select_options[this.selected],void(this.display_area.innerHTML=this.html_values[this.selected]))},enable:function(){this.always_disabled||(this.switcher.disabled=!1),this._super()},disable:function(){this.switcher.disabled=!0,this._super()},getHTML:function(a){var b=this;if(null===a)return"<em>null</em>";if("object"==typeof a){var c="";return d(a,function(d,e){var f=b.getHTML(e);Array.isArray(a)||(f="<div><em>"+d+"</em>: "+f+"</div>"),c+="<li>"+f+"</li>"}),c=Array.isArray(a)?"<ol>"+c+"</ol>":"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>"+c+"</ul>"}return"boolean"==typeof a?a?"true":"false":"string"==typeof a?a.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):a},setValue:function(a){this.value!==a&&(this.value=a,this.refreshValue(),this.onChange())},destroy:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),this._super()}}),f.defaults.editors.select=f.AbstractEditor.extend({setValue:function(a,b){a=this.typecast(a||"");var c=a;this.enum_values.indexOf(c)<0&&(c=this.enum_values[0]),this.value!==c&&(this.input.value=this.enum_options[this.enum_values.indexOf(c)],this.select2&&this.select2.select2("val",this.input.value),this.value=c,this.onChange())},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){if(!this.enum_options)return 3;for(var a=this.getTitle().length,b=0;b<this.enum_options.length;b++)a=Math.max(a,this.enum_options[b].length+4);return Math.min(12,Math.max(a/7,2))},typecast:function(a){return"boolean"===this.schema.type?!!a:"number"===this.schema.type?1*a:"integer"===this.schema.type?Math.floor(1*a):""+a},getValue:function(){return this.value},preBuild:function(){var a=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.schema["enum"]){var b=this.schema.options&&this.schema.options.enum_titles||[];d(this.schema["enum"],function(c,d){a.enum_options[c]=""+d,a.enum_display[c]=""+(b[c]||d),a.enum_values[c]=a.typecast(d)}),this.isRequired()||(a.enum_display.unshift(" "),a.enum_options.unshift("undefined"),a.enum_values.unshift(void 0))}else if("boolean"===this.schema.type)a.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],a.enum_options=["1",""],a.enum_values=[!0,!1],this.isRequired()||(a.enum_display.unshift(" "),a.enum_options.unshift("undefined"),a.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw"'select' editor requires the enum property to be set.";if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(h=0;h<this.schema.enumSource.length;h++)"string"==typeof this.schema.enumSource[h]?this.enumSource[h]={source:this.schema.enumSource[h]}:Array.isArray(this.schema.enumSource[h])?this.enumSource[h]=this.schema.enumSource[h]:this.enumSource[h]=c({},this.schema.enumSource[h]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(h=0;h<this.enumSource.length;h++)this.enumSource[h].value&&(this.enumSource[h].value=this.jsoneditor.compileTemplate(this.enumSource[h].value,this.template_engine)),this.enumSource[h].title&&(this.enumSource[h].title=this.jsoneditor.compileTemplate(this.enumSource[h].title,this.template_engine)),this.enumSource[h].filter&&(this.enumSource[h].filter=this.jsoneditor.compileTemplate(this.enumSource[h].filter,this.template_engine))}},build:function(){var a=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getSelectInput(this.enum_options),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.onInputChange()}),this.control=this.theme.getFormControl(this.label,this.input,this.description),this.container.appendChild(this.control),this.value=this.enum_values[0]},onInputChange:function(){var a=this.input.value,b=a;-1===this.enum_options.indexOf(a)&&(b=this.enum_options[0]),this.value=this.enum_values[this.enum_options.indexOf(a)],this.onChange(!0)},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&(this.enum_options.length>2||this.enum_options.length&&this.enumSource)){var a=c({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){b.input.value=b.select2.select2("val"),b.onInputChange()})}else this.select2=null},postBuild:function(){this._super(),this.theme.afterInputReady(this.input),this.setupSelect2()},onWatchedFieldChange:function(){var a,b;if(this.enumSource){a=this.getWatchedFieldValues();for(var c=[],d=[],e=0;e<this.enumSource.length;e++)if(Array.isArray(this.enumSource[e]))c=c.concat(this.enumSource[e]),d=d.concat(this.enumSource[e]);else{var f=[];if(f=Array.isArray(this.enumSource[e].source)?this.enumSource[e].source:a[this.enumSource[e].source]){if(this.enumSource[e].slice&&(f=Array.prototype.slice.apply(f,this.enumSource[e].slice)),this.enumSource[e].filter){var g=[];for(b=0;b<f.length;b++)this.enumSource[e].filter({i:b,item:f[b],watched:a})&&g.push(f[b]);f=g}var h=[],i=[];for(b=0;b<f.length;b++){var j=f[b];this.enumSource[e].value?i[b]=this.enumSource[e].value({i:b,item:j}):i[b]=f[b],this.enumSource[e].title?h[b]=this.enumSource[e].title({i:b,item:j}):h[b]=i[b]}c=c.concat(i),d=d.concat(h)}}var k=this.value;this.theme.setSelectOptions(this.input,c,d),this.enum_options=c,this.enum_display=d,this.enum_values=c,this.select2&&this.select2.select2("destroy"),-1!==c.indexOf(k)?(this.input.value=k,this.value=k):(this.input.value=c[0],this.value=c[0]||"",this.parent?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path)),this.setupSelect2()}this._super()},enable:function(){this.always_disabled||(this.input.disabled=!1,this.select2&&this.select2.select2("enable",!0)),this._super()},disable:function(){this.input.disabled=!0,this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),f.defaults.editors.multiselect=f.AbstractEditor.extend({preBuild:function(){this._super(),this.select_options={},this.select_values={};var a=this.jsoneditor.expandRefs(this.schema.items||{}),b=a["enum"]||[];for(this.option_keys=[],h=0;h<b.length;h++)this.sanitize(b[h])===b[h]&&(this.option_keys.push(b[h]+""),this.select_values[b[h]+""]=b[h])},build:function(){var a,b=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),!this.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},a=0;a<this.option_keys.length;a++){this.inputs[this.option_keys[a]]=this.theme.getCheckbox(),this.select_options[this.option_keys[a]]=this.inputs[this.option_keys[a]];var c=this.theme.getCheckboxLabel(this.option_keys[a]);this.controls[this.option_keys[a]]=this.theme.getFormControl(c,this.inputs[this.option_keys[a]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description)}else{for(this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys),this.input.multiple=!0,this.input.size=Math.min(10,this.option_keys.length),a=0;a<this.option_keys.length;a++)this.select_options[this.option_keys[a]]=this.input.children[a];(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.control=this.theme.getFormControl(this.label,this.input,this.description)}this.container.appendChild(this.control),this.control.addEventListener("change",function(c){c.preventDefault(),c.stopPropagation();var d=[];for(a=0;a<b.option_keys.length;a++)(b.select_options[b.option_keys[a]].selected||b.select_options[b.option_keys[a]].checked)&&d.push(b.select_values[b.option_keys[a]]);b.updateValue(d),b.onChange(!0)})},setValue:function(a,b){var c;for(a=a||[],"object"!=typeof a?a=[a]:Array.isArray(a)||(a=[]),c=0;c<a.length;c++)"string"!=typeof a[c]&&(a[c]+="");for(c in this.select_options)this.select_options.hasOwnProperty(c)&&(this.select_options[c]["select"===this.input_type?"selected":"checked"]=-1!==a.indexOf(c));this.updateValue(a),this.onChange()},setupSelect2:function(){if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2){var a=window.jQuery.extend({},f.plugins.select2);this.schema.options&&this.schema.options.select2_options&&(a=c(a,this.schema.options.select2_options)),this.select2=window.jQuery(this.input).select2(a);var b=this;this.select2.on("select2-blur",function(){var a=b.select2.select2("val");b.value=a,b.onChange(!0)})}else this.select2=null},onInputChange:function(){this.value=this.input.value,this.onChange(!0)},postBuild:function(){this._super(),this.setupSelect2()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){var a=this.getTitle().length;for(var b in this.select_values)this.select_values.hasOwnProperty(b)&&(a=Math.max(a,(this.select_values[b]+"").length+4));return Math.min(12,Math.max(a/7,2))},updateValue:function(a){for(var b=!1,c=[],d=0;d<a.length;d++)if(this.select_options[a[d]+""]){var e=this.sanitize(this.select_values[a[d]]);c.push(e),e!==a[d]&&(b=!0)}else b=!0;return this.value=c,this.select2&&this.select2.select2("val",this.value),b},sanitize:function(a){return"number"===this.schema.items.type?1*a:"integer"===this.schema.items.type?Math.floor(1*a):""+a},enable:function(){if(!this.always_disabled){if(this.input)this.input.disabled=!1;else if(this.inputs)for(var a in this.inputs)this.inputs.hasOwnProperty(a)&&(this.inputs[a].disabled=!1);this.select2&&this.select2.select2("enable",!0)}this._super()},disable:function(){if(this.input)this.input.disabled=!0;else if(this.inputs)for(var a in this.inputs)this.inputs.hasOwnProperty(a)&&(this.inputs[a].disabled=!0);this.select2&&this.select2.select2("enable",!1),this._super()},destroy:function(){this.select2&&(this.select2.select2("destroy"),this.select2=null),this._super()}}),f.defaults.editors.base64=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw"FileReader required for base64 editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}this.preview=this.theme.getFormInputDescription(this.schema.description),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var a=this.value.match(/^data:([^;,]+)[;,]/);if(a&&(a=a[1]),a){if(this.preview.innerHTML="<strong>Type:</strong> "+a+", <strong>Size:</strong> "+Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)+" bytes","image"===a.substr(0,5)){this.preview.innerHTML+="<br>";var b=document.createElement("img");b.style.maxWidth="100%",b.style.maxHeight="100px",b.src=this.value,this.preview.appendChild(b)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.refreshPreview(),this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.upload=f.AbstractEditor.extend({getNumColumns:function(){return 4},build:function(){var a=this;if(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!this.jsoneditor.options.upload)throw"Upload handler required for upload editor";this.uploader=this.theme.getFormInputField("file"),this.uploader.addEventListener("change",function(b){if(b.preventDefault(),b.stopPropagation(),this.files&&this.files.length){var c=new FileReader;c.onload=function(b){a.preview_value=b.target.result,a.refreshPreview(),a.onChange(!0),c=null},c.readAsDataURL(this.files[0])}})}var b=this.schema.description;b||(b=""),this.preview=this.theme.getFormInputDescription(b),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview),this.container.appendChild(this.control)},refreshPreview:function(){if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var a=this,b=this.preview_value.match(/^data:([^;,]+)[;,]/);b&&(b=b[1]),b||(b="unknown");var c=this.uploader.files[0];if(this.preview.innerHTML="<strong>Type:</strong> "+b+", <strong>Size:</strong> "+c.size+" bytes","image"===b.substr(0,5)){this.preview.innerHTML+="<br>";var d=document.createElement("img");d.style.maxWidth="100%",d.style.maxHeight="100px",d.src=this.preview_value,\r
+this.preview.appendChild(d)}this.preview.innerHTML+="<br>";var e=this.getButton("Upload","upload","Upload");this.preview.appendChild(e),e.addEventListener("click",function(b){b.preventDefault(),e.setAttribute("disabled","disabled"),a.theme.removeInputError(a.uploader),a.theme.getProgressBar&&(a.progressBar=a.theme.getProgressBar(),a.preview.appendChild(a.progressBar)),a.jsoneditor.options.upload(a.path,c,{success:function(b){a.setValue(b),a.parent?a.parent.onChildEditorChange(a):a.jsoneditor.onChange(),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},failure:function(b){a.theme.addInputError(a.uploader,b),a.progressBar&&a.preview.removeChild(a.progressBar),e.removeAttribute("disabled")},updateProgress:function(b){a.progressBar&&(b?a.theme.updateProgressBar(a.progressBar,b):a.theme.updateProgressBarUnknown(a.progressBar))}})})}},enable:function(){this.uploader&&(this.uploader.disabled=!1),this._super()},disable:function(){this.uploader&&(this.uploader.disabled=!0),this._super()},setValue:function(a){this.value!==a&&(this.value=a,this.input.value=this.value,this.onChange())},destroy:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),this._super()}}),f.defaults.editors.checkbox=f.AbstractEditor.extend({setValue:function(a,b){this.value=!!a,this.input.checked=this.value,this.onChange()},register:function(){this._super(),this.input&&this.input.setAttribute("name",this.formname)},unregister:function(){this._super(),this.input&&this.input.removeAttribute("name")},getNumColumns:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))},build:function(){var a=this;this.options.compact||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.schema.description)),this.options.compact&&(this.container.className+=" compact"),this.input=this.theme.getCheckbox(),this.control=this.theme.getFormControl(this.label,this.input,this.description),(this.schema.readOnly||this.schema.readonly)&&(this.always_disabled=!0,this.input.disabled=!0),this.input.addEventListener("change",function(b){b.preventDefault(),b.stopPropagation(),a.value=this.checked,a.onChange(!0)}),this.container.appendChild(this.control)},enable:function(){this.always_disabled||(this.input.disabled=!1),this._super()},disable:function(){this.input.disabled=!0,this._super()},destroy:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this._super()}});var g=function(){var a=document.documentElement;return a.matches?"matches":a.webkitMatchesSelector?"webkitMatchesSelector":a.mozMatchesSelector?"mozMatchesSelector":a.msMatchesSelector?"msMatchesSelector":a.oMatchesSelector?"oMatchesSelector":void 0}();f.AbstractTheme=a.extend({getContainer:function(){return document.createElement("div")},getFloatRightLinkHolder:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.cssFloat="right",a.style.marginLeft="10px",a},getModal:function(){var a=document.createElement("div");return a.style.backgroundColor="white",a.style.border="1px solid black",a.style.boxShadow="3px 3px black",a.style.position="absolute",a.style.zIndex="10",a.style.display="none",a},getGridContainer:function(){var a=document.createElement("div");return a},getGridRow:function(){var a=document.createElement("div");return a.className="row",a},getGridColumn:function(){var a=document.createElement("div");return a},setGridColumnSize:function(a,b){},getLink:function(a){var b=document.createElement("a");return b.setAttribute("href","#"),b.appendChild(document.createTextNode(a)),b},disableHeader:function(a){a.style.color="#ccc"},disableLabel:function(a){a.style.color="#ccc"},enableHeader:function(a){a.style.color=""},enableLabel:function(a){a.style.color=""},getFormInputLabel:function(a){var b=document.createElement("label");return b.appendChild(document.createTextNode(a)),b},getCheckboxLabel:function(a){var b=this.getFormInputLabel(a);return b.style.fontWeight="normal",b},getHeader:function(a,b){var c=document.createElement("h3");return"string"==typeof a?c.textContent=a:c.appendChild(a),b&&(c.className+=" required"),c},getCheckbox:function(){var a=this.getFormInputField("checkbox");return a.style.display="inline-block",a.style.width="auto",a},getMultiCheckboxHolder:function(a,b,c){var d=document.createElement("div");b&&(b.style.display="block",d.appendChild(b));for(var e in a)a.hasOwnProperty(e)&&(a[e].style.display="inline-block",a[e].style.marginRight="20px",d.appendChild(a[e]));return c&&d.appendChild(c),d},getSelectInput:function(a){var b=document.createElement("select");return a&&this.setSelectOptions(b,a),b},getSwitcher:function(a){var b=this.getSelectInput(a);return b.style.backgroundColor="transparent",b.style.display="inline-block",b.style.fontStyle="italic",b.style.fontWeight="normal",b.style.height="auto",b.style.marginBottom=0,b.style.marginLeft="5px",b.style.padding="0 0 0 3px",b.style.width="auto",b},getSwitcherOptions:function(a){return a.getElementsByTagName("option")},setSwitcherOptions:function(a,b,c){this.setSelectOptions(a,b,c)},setSelectOptions:function(a,b,c){c=c||[],a.innerHTML="";for(var d=0;d<b.length;d++){var e=document.createElement("option");e.setAttribute("value",b[d]),e.textContent=c[d]||b[d],a.appendChild(e)}},getTextareaInput:function(){var a=document.createElement("textarea");return a.style=a.style||{},a.style.width="100%",a.style.height="300px",a.style.boxSizing="border-box",a},getRangeInput:function(a,b,c){var d=this.getFormInputField("range");return d.setAttribute("min",a),d.setAttribute("max",b),d.setAttribute("step",c),d},getFormInputField:function(a){var b=document.createElement("input");return b.setAttribute("type",a),b},afterInputReady:function(a){},getFormControl:function(a,b,c){var d=document.createElement("div");return d.className="form-control",a&&d.appendChild(a),"checkbox"===b.type?a.insertBefore(b,a.firstChild):d.appendChild(b),c&&d.appendChild(c),d},getIndentedPanel:function(){var a=document.createElement("div");return a.style=a.style||{},a.style.paddingLeft="10px",a.style.marginLeft="10px",a.style.borderLeft="1px solid #ccc",a},getChildEditorHolder:function(){return document.createElement("div")},getDescription:function(a){var b=document.createElement("p");return b.innerHTML=a,b},getCheckboxDescription:function(a){return this.getDescription(a)},getFormInputDescription:function(a){return this.getDescription(a)},getHeaderButtonHolder:function(){return this.getButtonHolder()},getButtonHolder:function(){return document.createElement("div")},getButton:function(a,b,c){var d=document.createElement("button");return d.type="button",this.setButtonText(d,a,b,c),d},setButtonText:function(a,b,c,d){a.innerHTML="",c&&(a.appendChild(c),a.innerHTML+=" "),a.appendChild(document.createTextNode(b)),d&&a.setAttribute("title",d)},getTable:function(){return document.createElement("table")},getTableRow:function(){return document.createElement("tr")},getTableHead:function(){return document.createElement("thead")},getTableBody:function(){return document.createElement("tbody")},getTableHeaderCell:function(a){var b=document.createElement("th");return b.textContent=a,b},getTableCell:function(){var a=document.createElement("td");return a},getErrorMessage:function(a){var b=document.createElement("p");return b.style=b.style||{},b.style.color="red",b.appendChild(document.createTextNode(a)),b},addInputError:function(a,b){},removeInputError:function(a){},addTableRowError:function(a){},removeTableRowError:function(a){},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<div style='float: left; width: 130px;' class='tabs'></div><div class='content' style='margin-left: 130px;'></div><div style='clear:both;'></div>",a},applyStyles:function(a,b){a.style=a.style||{};for(var c in b)b.hasOwnProperty(c)&&(a.style[c]=b[c])},closest:function(a,b){for(;a&&a!==document;){if(!g)return!1;if(a[g](b))return a;a=a.parentNode}return!1},getTab:function(a){var b=document.createElement("div");return b.appendChild(a),b.style=b.style||{},this.applyStyles(b,{border:"1px solid #ccc",borderWidth:"1px 0 1px 1px",textAlign:"center",lineHeight:"30px",borderRadius:"5px",borderBottomRightRadius:0,borderTopRightRadius:0,fontWeight:"bold",cursor:"pointer"}),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){return this.getIndentedPanel()},markTabActive:function(a){this.applyStyles(a,{opacity:1,background:"white"})},markTabInactive:function(a){this.applyStyles(a,{opacity:.5,background:""})},addTab:function(a,b){a.children[0].appendChild(b)},getBlockLink:function(){var a=document.createElement("a");return a.style.display="block",a},getBlockLinkHolder:function(){var a=document.createElement("div");return a},getLinksHolder:function(){var a=document.createElement("div");return a},createMediaLink:function(a,b,c){a.appendChild(b),c.style.width="100%",a.appendChild(c)},createImageLink:function(a,b,c){a.appendChild(b),b.appendChild(c)}}),f.defaults.themes.bootstrap2=f.AbstractTheme.extend({getRangeInput:function(a,b,c){return this._super(a,b,c)},getGridContainer:function(){var a=document.createElement("div");return a.className="container-fluid",a},getGridRow:function(){var a=document.createElement("div");return a.className="row-fluid",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="inline-block",c.style.fontWeight="bold",b&&(c.className+=" required"),c},setGridColumnSize:function(a,b){a.className="span"+b},getSelectInput:function(a){var b=this._super(a);return b.style.width="auto",b.style.maxWidth="98%",b},getFormInputField:function(a){var b=this._super(a);return b.style.width="98%",b},afterInputReady:function(a){a.controlgroup||(a.controlgroup=this.closest(a,".control-group"),a.controls=this.closest(a,".controls"),this.closest(a,".compact")&&(a.controlgroup.className=a.controlgroup.className.replace(/control-group/g,"").replace(/[ ]{2,}/g," "),a.controls.className=a.controlgroup.className.replace(/controls/g,"").replace(/[ ]{2,}/g," "),a.style.marginBottom=0))},getIndentedPanel:function(){var a=document.createElement("div");return a.className="well well-small",a},getFormInputDescription:function(a){var b=document.createElement("p");return b.className="help-inline",b.textContent=a,b},getFormControl:function(a,b,c){var d=document.createElement("div");d.className="control-group";var e=document.createElement("div");return e.className="controls",a&&"checkbox"===b.getAttribute("type")?(d.appendChild(e),a.className+=" checkbox",a.appendChild(b),e.appendChild(a),e.style.height="30px"):(a&&(a.className+=" control-label",d.appendChild(a)),e.appendChild(b),d.appendChild(e)),c&&e.appendChild(c),d},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="btn-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+=" btn btn-default",d},getTable:function(){var a=document.createElement("table");return a.className="table table-bordered",a.style.width="auto",a.style.maxWidth="none",a},addInputError:function(a,b){a.controlgroup&&a.controls&&(a.controlgroup.className+=" error",a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("p"),a.errmsg.className="help-block errormsg",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none",a.controlgroup.className=a.controlgroup.className.replace(/\s?error/g,""))},getTabHolder:function(){var a=document.createElement("div");return a.className="tabbable tabs-left",a.innerHTML="<ul class='nav nav-tabs span2' style='margin-right: 0;'></ul><div class='tab-content span10' style='overflow:visible;'></div>",a},getTab:function(a){var b=document.createElement("li"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="tab-pane active",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s?active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("div");return b.className="bar",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.className="progress progress-striped active",a.firstChild.style.width="100%")}}),f.defaults.themes.bootstrap3=f.AbstractTheme.extend({getSelectInput:function(a){var b=this._super(a);return b.className+="form-control",b},setGridColumnSize:function(a,b){a.className="col-md-"+b},afterInputReady:function(a){a.controlgroup||(a.controlgroup=this.closest(a,".form-group"),this.closest(a,".compact")&&(a.controlgroup.style.marginBottom=0))},getTextareaInput:function(){var a=document.createElement("textarea");return a.className="form-control",a},getRangeInput:function(a,b,c){return this._super(a,b,c)},getFormInputField:function(a){var b=this._super(a);return"checkbox"!==a&&(b.className+="form-control"),b},getFormControl:function(a,b,c){var d=document.createElement("div");return a&&"checkbox"===b.type?(d.className+=" checkbox",a.appendChild(b),a.style.fontSize="14px",d.style.marginTop="0",d.appendChild(a),b.style.position="relative",b.style.cssFloat="left"):(d.className+=" form-group",a&&(a.className+=" control-label",d.appendChild(a)),d.appendChild(b)),c&&d.appendChild(c),d},getIndentedPanel:function(){var a=document.createElement("div");return a.className="well well-sm",a},getFormInputDescription:function(a){var b=document.createElement("p");return b.className="help-block",b.innerHTML=a,b},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="btn-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+="btn btn-default",d},getTable:function(){var a=document.createElement("table");return a.className="table table-bordered",a.style.width="auto",a.style.maxWidth="none",a},addInputError:function(a,b){a.controlgroup&&(a.controlgroup.className+=" has-error",a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("p"),a.errmsg.className="help-block errormsg",a.controlgroup.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none",a.controlgroup.className=a.controlgroup.className.replace(/\s?has-error/g,""))},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<div class='tabs list-group col-md-2'></div><div class='col-md-10'></div>",a.className="rows",a},getTab:function(a){var b=document.createElement("a");return b.className="list-group-item",b.setAttribute("href","#"),b.appendChild(a),b},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s?active/g,"")},getProgressBar:function(){var a=0,b=100,c=0,d=document.createElement("div");d.className="progress";var e=document.createElement("div");return e.className="progress-bar",e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",c),e.setAttribute("aria-valuemin",a),e.setAttribute("aria-valuenax",b),e.innerHTML=c+"%",d.appendChild(e),d},updateProgressBar:function(a,b){if(a){var c=a.firstChild,d=b+"%";c.setAttribute("aria-valuenow",b),c.style.width=d,c.innerHTML=d}},updateProgressBarUnknown:function(a){if(a){var b=a.firstChild;a.className="progress progress-striped active",b.removeAttribute("aria-valuenow"),b.style.width="100%",b.innerHTML=""}}}),f.defaults.themes.foundation=f.AbstractTheme.extend({getChildEditorHolder:function(){var a=document.createElement("div");return a.style.marginBottom="15px",a},getSelectInput:function(a){var b=this._super(a);return b.style.minWidth="none",b.style.padding="5px",b.style.marginTop="3px",b},getSwitcher:function(a){var b=this._super(a);return b.style.paddingRight="8px",b},afterInputReady:function(a){this.closest(a,".compact")&&(a.style.marginBottom=0),a.group=this.closest(a,".form-control")},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="inline-block",b&&(c.className+=" required"),c},getFormInputField:function(a){var b=this._super(a);return b.style.width="100%",b.style.marginBottom="checkbox"===a?"0":"12px",b},getFormInputDescription:function(a){var b=document.createElement("p");return b.textContent=a,b.style.marginTop="-10px",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=document.createElement("div");return a.className="panel",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.verticalAlign="middle",a},getButtonHolder:function(){var a=document.createElement("div");return a.className="button-group",a},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className+=" small button",d},addInputError:function(a,b){a.group&&(a.group.className+=" error",a.errmsg?a.errmsg.style.display="":(a.insertAdjacentHTML("afterend",'<small class="error"></small>'),a.errmsg=a.parentNode.getElementsByClassName("error")[0]),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.group.className=a.group.className.replace(/ error/g,""),a.errmsg.style.display="none")},getProgressBar:function(){var a=document.createElement("div");a.className="progress";var b=document.createElement("span");return b.className="meter",b.style.width="0%",a.appendChild(b),a},updateProgressBar:function(a,b){a&&(a.firstChild.style.width=b+"%")},updateProgressBarUnknown:function(a){a&&(a.firstChild.style.width="100%")}}),f.defaults.themes.foundation3=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c},getTabHolder:function(){var a=document.createElement("div");return a.className="row",a.innerHTML="<dl class='tabs vertical two columns'></dl><div class='tabs-content ten columns'></div>",a},setGridColumnSize:function(a,b){var c=["zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve"];a.className="columns "+c[b]},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.foundation4=f.defaults.themes.foundation.extend({getHeaderButtonHolder:function(){var a=this._super();return a.style.fontSize=".6em",a},setGridColumnSize:function(a,b){a.className="columns large-"+b},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},getFormInputLabel:function(a,b){var c=this._super(a);return c.style.fontWeight="bold",b&&(c.className+=" required"),c}}),f.defaults.themes.foundation5=f.defaults.themes.foundation.extend({getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8rem",b},setGridColumnSize:function(a,b){a.className="columns medium-"+b},getButton:function(a,b,c){var d=this._super(a,b,c);return d.className=d.className.replace(/\s*small/g,"")+" tiny",d},getTabHolder:function(){var a=document.createElement("div");return a.innerHTML="<dl class='tabs vertical'></dl><div class='tabs-content vertical'></div>",a},getTab:function(a){var b=document.createElement("dd"),c=document.createElement("a");return c.setAttribute("href","#"),c.appendChild(a),b.appendChild(c),b},getTabContentHolder:function(a){return a.children[1]},getTabContent:function(){var a=document.createElement("div");return a.className="content active",a.style.paddingLeft="5px",a},markTabActive:function(a){a.className+=" active"},markTabInactive:function(a){a.className=a.className.replace(/\s*active/g,"")},addTab:function(a,b){a.children[0].appendChild(b)}}),f.defaults.themes.html=f.AbstractTheme.extend({getFormInputLabel:function(a,b){var c=this._super(a);return c.style.display="block",c.style.marginBottom="3px",c.style.fontWeight="bold",b&&(c.className+=" required"),c},getFormInputDescription:function(a){var b=this._super(a);return b.style.fontSize=".8em",b.style.margin=0,b.style.display="inline-block",b.style.fontStyle="italic",b},getIndentedPanel:function(){var a=this._super();return a.style.border="1px solid #ddd",a.style.padding="5px",a.style.margin="5px",a.style.borderRadius="3px",a},getChildEditorHolder:function(){var a=this._super();return a.style.marginBottom="8px",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.display="inline-block",a.style.marginLeft="10px",a.style.fontSize=".8em",a.style.verticalAlign="middle",a},getTable:function(){var a=this._super();return a.style.borderBottom="1px solid #ccc",a.style.marginBottom="5px",a},addInputError:function(a,b){if(a.style.borderColor="red",a.errmsg)a.errmsg.style.display="block";else{var c=this.closest(a,".form-control");a.errmsg=document.createElement("div"),a.errmsg.setAttribute("class","errmsg"),a.errmsg.style=a.errmsg.style||{},a.errmsg.style.color="red",c.appendChild(a.errmsg)}a.errmsg.innerHTML="",a.errmsg.appendChild(document.createTextNode(b))},removeInputError:function(a){a.style.borderColor="",a.errmsg&&(a.errmsg.style.display="none")},getProgressBar:function(){var a=100,b=0,c=document.createElement("progress");return c.setAttribute("max",a),c.setAttribute("value",b),c},updateProgressBar:function(a,b){a&&a.setAttribute("value",b)},updateProgressBarUnknown:function(a){a&&a.removeAttribute("value")}}),f.defaults.themes.jqueryui=f.AbstractTheme.extend({getTable:function(){var a=this._super();return a.setAttribute("cellpadding",5),a.setAttribute("cellspacing",0),a},getTableHeaderCell:function(a){var b=this._super(a);return b.className="ui-state-active",b.style.fontWeight="bold",b},getTableCell:function(){var a=this._super();return a.className="ui-widget-content",a},getHeaderButtonHolder:function(){var a=this.getButtonHolder();return a.style.marginLeft="10px",a.style.fontSize=".6em",a.style.display="inline-block",a},getFormInputDescription:function(a){var b=this.getDescription(a);return b.style.marginLeft="10px",b.style.display="inline-block",b},getFormControl:function(a,b,c){var d=this._super(a,b,c);return"checkbox"===b.type?(d.style.lineHeight="25px",d.style.padding="3px 0"):d.style.padding="4px 0 8px 0",d},getDescription:function(a){var b=document.createElement("span");return b.style.fontSize=".8em",b.style.fontStyle="italic",b.textContent=a,b},getButtonHolder:function(){var a=document.createElement("div");return a.className="ui-buttonset",a.style.fontSize=".7em",a},getFormInputLabel:function(a,b){var c=document.createElement("label");return c.style.fontWeight="bold",c.style.display="block",b&&(c.className+=" required"),c.textContent=a,c},getButton:function(a,b,c){var d=document.createElement("button");d.className="ui-button ui-widget ui-state-default ui-corner-all",b&&!a?(d.className+=" ui-button-icon-only",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):b?(d.className+=" ui-button-text-icon-primary",b.className+=" ui-button-icon-primary ui-icon-primary",d.appendChild(b)):d.className+=" ui-button-text-only";var e=document.createElement("span");return e.className="ui-button-text",e.textContent=a||c||".",d.appendChild(e),d.setAttribute("title",c),d},setButtonText:function(a,b,c,d){a.innerHTML="",a.className="ui-button ui-widget ui-state-default ui-corner-all",c&&!b?(a.className+=" ui-button-icon-only",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):c?(a.className+=" ui-button-text-icon-primary",c.className+=" ui-button-icon-primary ui-icon-primary",a.appendChild(c)):a.className+=" ui-button-text-only";var e=document.createElement("span");e.className="ui-button-text",e.textContent=b||d||".",a.appendChild(e),a.setAttribute("title",d)},getIndentedPanel:function(){var a=document.createElement("div");return a.className="ui-widget-content ui-corner-all",a.style.padding="1em 1.4em",a.style.marginBottom="20px",a},afterInputReady:function(a){a.controls||(a.controls=this.closest(a,".form-control"))},addInputError:function(a,b){a.controls&&(a.errmsg?a.errmsg.style.display="":(a.errmsg=document.createElement("div"),a.errmsg.className="ui-state-error",a.controls.appendChild(a.errmsg)),a.errmsg.textContent=b)},removeInputError:function(a){a.errmsg&&(a.errmsg.style.display="none")},markTabActive:function(a){a.className=a.className.replace(/\s*ui-widget-header/g,"")+" ui-state-active"},markTabInactive:function(a){a.className=a.className.replace(/\s*ui-state-active/g,"")+" ui-widget-header"}}),f.AbstractIconLib=a.extend({mapping:{collapse:"",expand:"","delete":"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},icon_prefix:"",getIconClass:function(a){return this.mapping[a]?this.icon_prefix+this.mapping[a]:null},getIcon:function(a){var b=this.getIconClass(a);if(!b)return null;var c=document.createElement("i");return c.className=b,c}}),f.defaults.iconlibs.bootstrap2=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-up","delete":"trash",edit:"pencil",add:"plus",cancel:"ban-circle",save:"ok",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.bootstrap3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"glyphicon glyphicon-"}),f.defaults.iconlibs.fontawesome3=f.AbstractIconLib.extend({mapping:{collapse:"chevron-down",expand:"chevron-right","delete":"remove",edit:"pencil",add:"plus",cancel:"ban-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"icon-"}),f.defaults.iconlibs.fontawesome4=f.AbstractIconLib.extend({mapping:{collapse:"caret-square-o-down",expand:"caret-square-o-right","delete":"times",edit:"pencil",add:"plus",cancel:"ban",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fa fa-"}),f.defaults.iconlibs.foundation2=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"remove",edit:"edit",add:"add-doc",cancel:"error",save:"checkmark",moveup:"up-arrow",movedown:"down-arrow"},icon_prefix:"foundicon-"}),f.defaults.iconlibs.foundation3=f.AbstractIconLib.extend({mapping:{collapse:"minus",expand:"plus","delete":"x",edit:"pencil",add:"page-add",cancel:"x-circle",save:"save",moveup:"arrow-up",movedown:"arrow-down"},icon_prefix:"fi-"}),f.defaults.iconlibs.jqueryui=f.AbstractIconLib.extend({mapping:{collapse:"triangle-1-s",expand:"triangle-1-e","delete":"trash",edit:"pencil",add:"plusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",movedown:"arrowthick-1-s"},icon_prefix:"ui-icon ui-icon-"}),f.defaults.templates["default"]=function(){return{compile:function(a){var b=a.match(/{{\s*([a-zA-Z0-9\-_ \.]+)\s*}}/g),c=b&&b.length;if(!c)return function(){return a};for(var d=[],e=function(a){var c,e=b[a].replace(/[{}]+/g,"").trim().split("."),f=e.length;if(f>1){var g;c=function(b){for(g=b,a=0;f>a&&(g=g[e[a]],g);a++);return g}}else e=e[0],c=function(a){return a[e]};d.push({s:b[a],r:c})},f=0;c>f;f++)e(f);return function(b){var e,g=a+"";for(f=0;c>f;f++)e=d[f],g=g.replace(e.s,e.r(b));return g}}}},f.defaults.templates.ejs=function(){return window.EJS?{compile:function(a){var b=new window.EJS({text:a});return function(a){return b.render(a)}}}:!1},f.defaults.templates.handlebars=function(){return window.Handlebars},f.defaults.templates.hogan=function(){return window.Hogan?{compile:function(a){var b=window.Hogan.compile(a);return function(a){return b.render(a)}}}:!1},f.defaults.templates.markup=function(){return window.Mark&&window.Mark.up?{compile:function(a){return function(b){return window.Mark.up(a,b)}}}:!1},f.defaults.templates.mustache=function(){return window.Mustache?{compile:function(a){return function(b){return window.Mustache.render(a,b)}}}:!1},f.defaults.templates.swig=function(){return window.swig},f.defaults.templates.underscore=function(){return window._?{compile:function(a){return function(b){return window._.template(a,b)}}}:!1},f.defaults.theme="html",f.defaults.template="default",f.defaults.options={},f.defaults.translate=function(a,b){var c=f.defaults.languages[f.defaults.language];if(!c)throw"Unknown language "+f.defaults.language;var d=c[a]||f.defaults.languages[f.defaults.default_language][a];if("undefined"==typeof d)throw"Unknown translate string "+a;if(b)for(var e=0;e<b.length;e++)d=d.replace(new RegExp("\\{\\{"+e+"}}","g"),b[e]);return d},f.defaults.default_language="en",f.defaults.language=f.defaults.default_language,f.defaults.languages.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the provided pattern",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_dependency:"Must have property {{0}}"},f.plugins={ace:{theme:""},epiceditor:{},sceditor:{},select2:{}};for(var h in f.defaults.editors)f.defaults.editors.hasOwnProperty(h)&&(f.defaults.editors[h].options=f.defaults.editors.options||{});f.defaults.resolvers.unshift(function(a){return"string"!=typeof a.type?"multiple":void 0}),f.defaults.resolvers.unshift(function(a){return!a.type&&a.properties?"object":void 0}),f.defaults.resolvers.unshift(function(a){return"string"==typeof a.type?a.type:void 0}),f.defaults.resolvers.unshift(function(a){return"boolean"===a.type?"checkbox"===a.format||a.options&&a.options.checkbox?"checkbox":"select":void 0;\r
+}),f.defaults.resolvers.unshift(function(a){return"any"===a.type?"multiple":void 0}),f.defaults.resolvers.unshift(function(a){return"string"===a.type&&a.media&&"base64"===a.media.binaryEncoding?"base64":void 0}),f.defaults.resolvers.unshift(function(a){return"string"===a.type&&"url"===a.format&&a.options&&a.options.upload===!0&&window.FileReader?"upload":void 0}),f.defaults.resolvers.unshift(function(a){return"array"==a.type&&"table"==a.format?"table":void 0}),f.defaults.resolvers.unshift(function(a){return a.enumSource?"select":void 0}),f.defaults.resolvers.unshift(function(a){if(a["enum"]){if("array"===a.type||"object"===a.type)return"enum";if("number"===a.type||"integer"===a.type||"string"===a.type)return"select"}}),f.defaults.resolvers.unshift(function(a){return"array"===a.type&&a.items&&!Array.isArray(a.items)&&a.uniqueItems&&a.items["enum"]&&["string","number","integer"].indexOf(a.items.type)>=0?"multiselect":void 0}),f.defaults.resolvers.unshift(function(a){return a.oneOf?"multiple":void 0}),function(){if(window.jQuery||window.Zepto){var a=window.jQuery||window.Zepto;a.jsoneditor=f.defaults,a.fn.jsoneditor=function(a){var b=this,c=this.data("jsoneditor");if("value"===a){if(!c)throw"Must initialize jsoneditor before getting/setting the value";if(!(arguments.length>1))return c.getValue();c.setValue(arguments[1])}else{if("validate"===a){if(!c)throw"Must initialize jsoneditor before validating";return arguments.length>1?c.validate(arguments[1]):c.validate()}"destroy"===a?c&&(c.destroy(),this.data("jsoneditor",null)):(c&&c.destroy(),c=new f(this.get(0),a),this.data("jsoneditor",c),c.on("change",function(){b.trigger("change")}),c.on("ready",function(){b.trigger("ready")}))}return this}}}(),window.JSONEditor=f}();
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/lodash.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/lodash.min.js
new file mode 100644 (file)
index 0000000..3fd889c
--- /dev/null
@@ -0,0 +1,102 @@
+/**\r
+ * @license\r
+ * lodash 3.10.1 (Custom Build) lodash.com/license | Underscore.js 1.8.3 underscorejs.org/LICENSE\r
+ * Build: `lodash compat -o ./lodash.js`\r
+ */\r
+;(function(){function n(n,t){if(n!==t){var r=null===n,e=n===w,u=n===n,o=null===t,i=t===w,f=t===t;if(n>t&&!o||!u||r&&!i&&f||e&&f)return 1;if(n<t&&!r||!f||o&&!e&&u||i&&u)return-1}return 0}function t(n,t,r){for(var e=n.length,u=r?e:-1;r?u--:++u<e;)if(t(n[u],u,n))return u;return-1}function r(n,t,r){if(t!==t)return p(n,r);r-=1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(n){return typeof n=="function"||false}function u(n){return null==n?"":n+""}function o(n,t){for(var r=-1,e=n.length;++r<e&&-1<t.indexOf(n.charAt(r)););\r
+return r}function i(n,t){for(var r=n.length;r--&&-1<t.indexOf(n.charAt(r)););return r}function f(t,r){return n(t.a,r.a)||t.b-r.b}function a(n){return Nn[n]}function c(n){return Tn[n]}function l(n,t,r){return t?n=Bn[n]:r&&(n=Dn[n]),"\\"+n}function s(n){return"\\"+Dn[n]}function p(n,t,r){var e=n.length;for(t+=r?0:-1;r?t--:++t<e;){var u=n[t];if(u!==u)return t}return-1}function h(n){return!!n&&typeof n=="object"}function _(n){return 160>=n&&9<=n&&13>=n||32==n||160==n||5760==n||6158==n||8192<=n&&(8202>=n||8232==n||8233==n||8239==n||8287==n||12288==n||65279==n);\r
+}function v(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;)n[r]===t&&(n[r]=P,o[++u]=r);return o}function g(n){for(var t=-1,r=n.length;++t<r&&_(n.charCodeAt(t)););return t}function y(n){for(var t=n.length;t--&&_(n.charCodeAt(t)););return t}function d(n){return Pn[n]}function m(_){function Nn(n){if(h(n)&&!(Wo(n)||n instanceof zn)){if(n instanceof Pn)return n;if(eu.call(n,"__chain__")&&eu.call(n,"__wrapped__"))return qr(n)}return new Pn(n)}function Tn(){}function Pn(n,t,r){this.__wrapped__=n,this.__actions__=r||[],\r
+this.__chain__=!!t}function zn(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=false,this.__iteratees__=[],this.__takeCount__=Cu,this.__views__=[]}function Bn(){this.__data__={}}function Dn(n){var t=n?n.length:0;for(this.data={hash:mu(null),set:new hu};t--;)this.push(n[t])}function Mn(n,t){var r=n.data;return(typeof t=="string"||de(t)?r.set.has(t):r.hash[t])?0:-1}function qn(n,t){var r=-1,e=n.length;for(t||(t=De(e));++r<e;)t[r]=n[r];return t}function Kn(n,t){for(var r=-1,e=n.length;++r<e&&false!==t(n[r],r,n););\r
+return n}function Vn(n,t){for(var r=-1,e=n.length;++r<e;)if(!t(n[r],r,n))return false;return true}function Zn(n,t){for(var r=-1,e=n.length,u=-1,o=[];++r<e;){var i=n[r];t(i,r,n)&&(o[++u]=i)}return o}function Xn(n,t){for(var r=-1,e=n.length,u=De(e);++r<e;)u[r]=t(n[r],r,n);return u}function Hn(n,t){for(var r=-1,e=t.length,u=n.length;++r<e;)n[u+r]=t[r];return n}function Qn(n,t,r,e){var u=-1,o=n.length;for(e&&o&&(r=n[++u]);++u<o;)r=t(r,n[u],u,n);return r}function nt(n,t){for(var r=-1,e=n.length;++r<e;)if(t(n[r],r,n))return true;\r
+return false}function tt(n,t,r,e){return n!==w&&eu.call(e,r)?n:t}function rt(n,t,r){for(var e=-1,u=Ko(t),o=u.length;++e<o;){var i=u[e],f=n[i],a=r(f,t[i],i,n,t);(a===a?a===f:f!==f)&&(f!==w||i in n)||(n[i]=a)}return n}function et(n,t){return null==t?n:ot(t,Ko(t),n)}function ut(n,t){for(var r=-1,e=null==n,u=!e&&Sr(n),o=u?n.length:0,i=t.length,f=De(i);++r<i;){var a=t[r];f[r]=u?Ur(a,o)?n[a]:w:e?w:n[a]}return f}function ot(n,t,r){r||(r={});for(var e=-1,u=t.length;++e<u;){var o=t[e];r[o]=n[o]}return r}function it(n,t,r){\r
+var e=typeof n;return"function"==e?t===w?n:Dt(n,t,r):null==n?Ne:"object"==e?At(n):t===w?Be(n):jt(n,t)}function ft(n,t,r,e,u,o,i){var f;if(r&&(f=u?r(n,e,u):r(n)),f!==w)return f;if(!de(n))return n;if(e=Wo(n)){if(f=Ir(n),!t)return qn(n,f)}else{var a=ou.call(n),c=a==K;if(a!=Z&&a!=z&&(!c||u))return Ln[a]?Er(n,a,t):u?n:{};if(Gn(n))return u?n:{};if(f=Rr(c?{}:n),!t)return et(f,n)}for(o||(o=[]),i||(i=[]),u=o.length;u--;)if(o[u]==n)return i[u];return o.push(n),i.push(f),(e?Kn:gt)(n,function(e,u){f[u]=ft(e,t,r,u,n,o,i);\r
+}),f}function at(n,t,r){if(typeof n!="function")throw new Xe(T);return _u(function(){n.apply(w,r)},t)}function ct(n,t){var e=n?n.length:0,u=[];if(!e)return u;var o=-1,i=jr(),f=i===r,a=f&&t.length>=F&&mu&&hu?new Dn(t):null,c=t.length;a&&(i=Mn,f=false,t=a);n:for(;++o<e;)if(a=n[o],f&&a===a){for(var l=c;l--;)if(t[l]===a)continue n;u.push(a)}else 0>i(t,a,0)&&u.push(a);return u}function lt(n,t){var r=true;return zu(n,function(n,e,u){return r=!!t(n,e,u)}),r}function st(n,t,r,e){var u=e,o=u;return zu(n,function(n,i,f){\r
+i=+t(n,i,f),(r(i,u)||i===e&&i===o)&&(u=i,o=n)}),o}function pt(n,t){var r=[];return zu(n,function(n,e,u){t(n,e,u)&&r.push(n)}),r}function ht(n,t,r,e){var u;return r(n,function(n,r,o){return t(n,r,o)?(u=e?r:n,false):void 0}),u}function _t(n,t,r,e){e||(e=[]);for(var u=-1,o=n.length;++u<o;){var i=n[u];h(i)&&Sr(i)&&(r||Wo(i)||_e(i))?t?_t(i,t,r,e):Hn(e,i):r||(e[e.length]=i)}return e}function vt(n,t){return Du(n,t,Ee)}function gt(n,t){return Du(n,t,Ko)}function yt(n,t){return Mu(n,t,Ko)}function dt(n,t){for(var r=-1,e=t.length,u=-1,o=[];++r<e;){\r
+var i=t[r];ye(n[i])&&(o[++u]=i)}return o}function mt(n,t,r){if(null!=n){n=Dr(n),r!==w&&r in n&&(t=[r]),r=0;for(var e=t.length;null!=n&&r<e;)n=Dr(n)[t[r++]];return r&&r==e?n:w}}function wt(n,t,r,e,u,o){if(n===t)return true;if(null==n||null==t||!de(n)&&!h(t))return n!==n&&t!==t;n:{var i=wt,f=Wo(n),a=Wo(t),c=B,l=B;f||(c=ou.call(n),c==z?c=Z:c!=Z&&(f=je(n))),a||(l=ou.call(t),l==z?l=Z:l!=Z&&je(t));var s=c==Z&&!Gn(n),a=l==Z&&!Gn(t),l=c==l;if(!l||f||s){if(!e&&(c=s&&eu.call(n,"__wrapped__"),a=a&&eu.call(t,"__wrapped__"),\r
+c||a)){n=i(c?n.value():n,a?t.value():t,r,e,u,o);break n}if(l){for(u||(u=[]),o||(o=[]),c=u.length;c--;)if(u[c]==n){n=o[c]==t;break n}u.push(n),o.push(t),n=(f?mr:xr)(n,t,i,r,e,u,o),u.pop(),o.pop()}else n=false}else n=wr(n,t,c)}return n}function xt(n,t,r){var e=t.length,u=e,o=!r;if(null==n)return!u;for(n=Dr(n);e--;){var i=t[e];if(o&&i[2]?i[1]!==n[i[0]]:!(i[0]in n))return false}for(;++e<u;){var i=t[e],f=i[0],a=n[f],c=i[1];if(o&&i[2]){if(a===w&&!(f in n))return false}else if(i=r?r(a,c,f):w,i===w?!wt(c,a,r,true):!i)return false;\r
+}return true}function bt(n,t){var r=-1,e=Sr(n)?De(n.length):[];return zu(n,function(n,u,o){e[++r]=t(n,u,o)}),e}function At(n){var t=kr(n);if(1==t.length&&t[0][2]){var r=t[0][0],e=t[0][1];return function(n){return null==n?false:(n=Dr(n),n[r]===e&&(e!==w||r in n))}}return function(n){return xt(n,t)}}function jt(n,t){var r=Wo(n),e=Wr(n)&&t===t&&!de(t),u=n+"";return n=Mr(n),function(o){if(null==o)return false;var i=u;if(o=Dr(o),!(!r&&e||i in o)){if(o=1==n.length?o:mt(o,St(n,0,-1)),null==o)return false;i=Gr(n),o=Dr(o);\r
+}return o[i]===t?t!==w||i in o:wt(t,o[i],w,true)}}function kt(n,t,r,e,u){if(!de(n))return n;var o=Sr(t)&&(Wo(t)||je(t)),i=o?w:Ko(t);return Kn(i||t,function(f,a){if(i&&(a=f,f=t[a]),h(f)){e||(e=[]),u||(u=[]);n:{for(var c=a,l=e,s=u,p=l.length,_=t[c];p--;)if(l[p]==_){n[c]=s[p];break n}var p=n[c],v=r?r(p,_,c,n,t):w,g=v===w;g&&(v=_,Sr(_)&&(Wo(_)||je(_))?v=Wo(p)?p:Sr(p)?qn(p):[]:xe(_)||_e(_)?v=_e(p)?Ie(p):xe(p)?p:{}:g=false),l.push(_),s.push(v),g?n[c]=kt(v,_,r,l,s):(v===v?v!==p:p===p)&&(n[c]=v)}}else c=n[a],\r
+l=r?r(c,f,a,n,t):w,(s=l===w)&&(l=f),l===w&&(!o||a in n)||!s&&(l===l?l===c:c!==c)||(n[a]=l)}),n}function Ot(n){return function(t){return null==t?w:Dr(t)[n]}}function It(n){var t=n+"";return n=Mr(n),function(r){return mt(r,n,t)}}function Rt(n,t){for(var r=n?t.length:0;r--;){var e=t[r];if(e!=u&&Ur(e)){var u=e;vu.call(n,e,1)}}return n}function Et(n,t){return n+wu(Ru()*(t-n+1))}function Ct(n,t,r,e,u){return u(n,function(n,u,o){r=e?(e=false,n):t(r,n,u,o)}),r}function St(n,t,r){var e=-1,u=n.length;for(t=null==t?0:+t||0,\r
+0>t&&(t=-t>u?0:u+t),r=r===w||r>u?u:+r||0,0>r&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0,r=De(u);++e<u;)r[e]=n[e+t];return r}function Ut(n,t){var r;return zu(n,function(n,e,u){return r=t(n,e,u),!r}),!!r}function $t(n,t){var r=n.length;for(n.sort(t);r--;)n[r]=n[r].c;return n}function Wt(t,r,e){var u=br(),o=-1;return r=Xn(r,function(n){return u(n)}),t=bt(t,function(n){return{a:Xn(r,function(t){return t(n)}),b:++o,c:n}}),$t(t,function(t,r){var u;n:{for(var o=-1,i=t.a,f=r.a,a=i.length,c=e.length;++o<a;)if(u=n(i[o],f[o])){\r
+if(o>=c)break n;o=e[o],u*="asc"===o||true===o?1:-1;break n}u=t.b-r.b}return u})}function Ft(n,t){var r=0;return zu(n,function(n,e,u){r+=+t(n,e,u)||0}),r}function Lt(n,t){var e=-1,u=jr(),o=n.length,i=u===r,f=i&&o>=F,a=f&&mu&&hu?new Dn(void 0):null,c=[];a?(u=Mn,i=false):(f=false,a=t?[]:c);n:for(;++e<o;){var l=n[e],s=t?t(l,e,n):l;if(i&&l===l){for(var p=a.length;p--;)if(a[p]===s)continue n;t&&a.push(s),c.push(l)}else 0>u(a,s,0)&&((t||f)&&a.push(s),c.push(l))}return c}function Nt(n,t){for(var r=-1,e=t.length,u=De(e);++r<e;)u[r]=n[t[r]];\r
+return u}function Tt(n,t,r,e){for(var u=n.length,o=e?u:-1;(e?o--:++o<u)&&t(n[o],o,n););return r?St(n,e?0:o,e?o+1:u):St(n,e?o+1:0,e?u:o)}function Pt(n,t){var r=n;r instanceof zn&&(r=r.value());for(var e=-1,u=t.length;++e<u;)var o=t[e],r=o.func.apply(o.thisArg,Hn([r],o.args));return r}function zt(n,t,r){var e=0,u=n?n.length:e;if(typeof t=="number"&&t===t&&u<=Uu){for(;e<u;){var o=e+u>>>1,i=n[o];(r?i<=t:i<t)&&null!==i?e=o+1:u=o}return u}return Bt(n,t,Ne,r)}function Bt(n,t,r,e){t=r(t);for(var u=0,o=n?n.length:0,i=t!==t,f=null===t,a=t===w;u<o;){\r
+var c=wu((u+o)/2),l=r(n[c]),s=l!==w,p=l===l;(i?p||e:f?p&&s&&(e||null!=l):a?p&&(e||s):null==l?0:e?l<=t:l<t)?u=c+1:o=c}return ku(o,Su)}function Dt(n,t,r){if(typeof n!="function")return Ne;if(t===w)return n;switch(r){case 1:return function(r){return n.call(t,r)};case 3:return function(r,e,u){return n.call(t,r,e,u)};case 4:return function(r,e,u,o){return n.call(t,r,e,u,o)};case 5:return function(r,e,u,o,i){return n.call(t,r,e,u,o,i)}}return function(){return n.apply(t,arguments)}}function Mt(n){var t=new au(n.byteLength);\r
+return new gu(t).set(new gu(n)),t}function qt(n,t,r){for(var e=r.length,u=-1,o=ju(n.length-e,0),i=-1,f=t.length,a=De(f+o);++i<f;)a[i]=t[i];for(;++u<e;)a[r[u]]=n[u];for(;o--;)a[i++]=n[u++];return a}function Kt(n,t,r){for(var e=-1,u=r.length,o=-1,i=ju(n.length-u,0),f=-1,a=t.length,c=De(i+a);++o<i;)c[o]=n[o];for(i=o;++f<a;)c[i+f]=t[f];for(;++e<u;)c[i+r[e]]=n[o++];return c}function Vt(n,t){return function(r,e,u){var o=t?t():{};if(e=br(e,u,3),Wo(r)){u=-1;for(var i=r.length;++u<i;){var f=r[u];n(o,f,e(f,u,r),r);\r
+}}else zu(r,function(t,r,u){n(o,t,e(t,r,u),u)});return o}}function Zt(n){return pe(function(t,r){var e=-1,u=null==t?0:r.length,o=2<u?r[u-2]:w,i=2<u?r[2]:w,f=1<u?r[u-1]:w;for(typeof o=="function"?(o=Dt(o,f,5),u-=2):(o=typeof f=="function"?f:w,u-=o?1:0),i&&$r(r[0],r[1],i)&&(o=3>u?w:o,u=1);++e<u;)(i=r[e])&&n(t,i,o);return t})}function Yt(n,t){return function(r,e){var u=r?Vu(r):0;if(!Lr(u))return n(r,e);for(var o=t?u:-1,i=Dr(r);(t?o--:++o<u)&&false!==e(i[o],o,i););return r}}function Gt(n){return function(t,r,e){\r
+var u=Dr(t);e=e(t);for(var o=e.length,i=n?o:-1;n?i--:++i<o;){var f=e[i];if(false===r(u[f],f,u))break}return t}}function Jt(n,t){function r(){return(this&&this!==Yn&&this instanceof r?e:n).apply(t,arguments)}var e=Ht(n);return r}function Xt(n){return function(t){var r=-1;t=Fe(Ue(t));for(var e=t.length,u="";++r<e;)u=n(u,t[r],r);return u}}function Ht(n){return function(){var t=arguments;switch(t.length){case 0:return new n;case 1:return new n(t[0]);case 2:return new n(t[0],t[1]);case 3:return new n(t[0],t[1],t[2]);\r
+case 4:return new n(t[0],t[1],t[2],t[3]);case 5:return new n(t[0],t[1],t[2],t[3],t[4]);case 6:return new n(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new n(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=Pu(n.prototype),t=n.apply(r,t);return de(t)?t:r}}function Qt(n){function t(r,e,u){return u&&$r(r,e,u)&&(e=w),r=dr(r,n,w,w,w,w,w,e),r.placeholder=t.placeholder,r}return t}function nr(n,t){return pe(function(r){var e=r[0];return null==e?e:(r.push(t),n.apply(w,r))})}function tr(n,t){return function(r,e,u){\r
+if(u&&$r(r,e,u)&&(e=w),e=br(e,u,3),1==e.length){u=r=Wo(r)?r:Br(r);for(var o=e,i=-1,f=u.length,a=t,c=a;++i<f;){var l=u[i],s=+o(l);n(s,a)&&(a=s,c=l)}if(u=c,!r.length||u!==t)return u}return st(r,e,n,t)}}function rr(n,r){return function(e,u,o){return u=br(u,o,3),Wo(e)?(u=t(e,u,r),-1<u?e[u]:w):ht(e,u,n)}}function er(n){return function(r,e,u){return r&&r.length?(e=br(e,u,3),t(r,e,n)):-1}}function ur(n){return function(t,r,e){return r=br(r,e,3),ht(t,r,n,true)}}function or(n){return function(){for(var t,r=arguments.length,e=n?r:-1,u=0,o=De(r);n?e--:++e<r;){\r
+var i=o[u++]=arguments[e];if(typeof i!="function")throw new Xe(T);!t&&Pn.prototype.thru&&"wrapper"==Ar(i)&&(t=new Pn([],true))}for(e=t?-1:r;++e<r;){var i=o[e],u=Ar(i),f="wrapper"==u?Ku(i):w;t=f&&Fr(f[0])&&f[1]==(E|k|I|C)&&!f[4].length&&1==f[9]?t[Ar(f[0])].apply(t,f[3]):1==i.length&&Fr(i)?t[u]():t.thru(i)}return function(){var n=arguments,e=n[0];if(t&&1==n.length&&Wo(e)&&e.length>=F)return t.plant(e).value();for(var u=0,n=r?o[u].apply(this,n):e;++u<r;)n=o[u].call(this,n);return n}}}function ir(n,t){\r
+return function(r,e,u){return typeof e=="function"&&u===w&&Wo(r)?n(r,e):t(r,Dt(e,u,3))}}function fr(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r,Ee)}}function ar(n){return function(t,r,e){return(typeof r!="function"||e!==w)&&(r=Dt(r,e,3)),n(t,r)}}function cr(n){return function(t,r,e){var u={};return r=br(r,e,3),gt(t,function(t,e,o){o=r(t,e,o),e=n?o:e,t=n?t:o,u[e]=t}),u}}function lr(n){return function(t,r,e){return t=u(t),(n?t:"")+_r(t,r,e)+(n?"":t)}}function sr(n){\r
+var t=pe(function(r,e){var u=v(e,t.placeholder);return dr(r,n,w,e,u)});return t}function pr(n,t){return function(r,e,u,o){var i=3>arguments.length;return typeof e=="function"&&o===w&&Wo(r)?n(r,e,u,i):Ct(r,br(e,o,4),u,i,t)}}function hr(n,t,r,e,u,o,i,f,a,c){function l(){for(var m=arguments.length,x=m,j=De(m);x--;)j[x]=arguments[x];if(e&&(j=qt(j,e,u)),o&&(j=Kt(j,o,i)),_||y){var x=l.placeholder,k=v(j,x),m=m-k.length;if(m<c){var O=f?qn(f):w,m=ju(c-m,0),E=_?k:w,k=_?w:k,C=_?j:w,j=_?w:j;return t|=_?I:R,t&=~(_?R:I),\r
+g||(t&=~(b|A)),j=[n,t,r,C,E,j,k,O,a,m],O=hr.apply(w,j),Fr(n)&&Zu(O,j),O.placeholder=x,O}}if(x=p?r:this,O=h?x[n]:n,f)for(m=j.length,E=ku(f.length,m),k=qn(j);E--;)C=f[E],j[E]=Ur(C,m)?k[C]:w;return s&&a<j.length&&(j.length=a),this&&this!==Yn&&this instanceof l&&(O=d||Ht(n)),O.apply(x,j)}var s=t&E,p=t&b,h=t&A,_=t&k,g=t&j,y=t&O,d=h?w:Ht(n);return l}function _r(n,t,r){return n=n.length,t=+t,n<t&&bu(t)?(t-=n,r=null==r?" ":r+"",$e(r,du(t/r.length)).slice(0,t)):""}function vr(n,t,r,e){function u(){for(var t=-1,f=arguments.length,a=-1,c=e.length,l=De(c+f);++a<c;)l[a]=e[a];\r
+for(;f--;)l[a++]=arguments[++t];return(this&&this!==Yn&&this instanceof u?i:n).apply(o?r:this,l)}var o=t&b,i=Ht(n);return u}function gr(n){var t=Ve[n];return function(n,r){return(r=r===w?0:+r||0)?(r=su(10,r),t(n*r)/r):t(n)}}function yr(n){return function(t,r,e,u){var o=br(e);return null==e&&o===it?zt(t,r,n):Bt(t,r,o(e,u,1),n)}}function dr(n,t,r,e,u,o,i,f){var a=t&A;if(!a&&typeof n!="function")throw new Xe(T);var c=e?e.length:0;if(c||(t&=~(I|R),e=u=w),c-=u?u.length:0,t&R){var l=e,s=u;e=u=w}var p=a?w:Ku(n);\r
+return r=[n,t,r,e,u,l,s,o,i,f],p&&(e=r[1],t=p[1],f=e|t,u=t==E&&e==k||t==E&&e==C&&r[7].length<=p[8]||t==(E|C)&&e==k,(f<E||u)&&(t&b&&(r[2]=p[2],f|=e&b?0:j),(e=p[3])&&(u=r[3],r[3]=u?qt(u,e,p[4]):qn(e),r[4]=u?v(r[3],P):qn(p[4])),(e=p[5])&&(u=r[5],r[5]=u?Kt(u,e,p[6]):qn(e),r[6]=u?v(r[5],P):qn(p[6])),(e=p[7])&&(r[7]=qn(e)),t&E&&(r[8]=null==r[8]?p[8]:ku(r[8],p[8])),null==r[9]&&(r[9]=p[9]),r[0]=p[0],r[1]=f),t=r[1],f=r[9]),r[9]=null==f?a?0:n.length:ju(f-c,0)||0,n=t==b?Jt(r[0],r[2]):t!=I&&t!=(b|I)||r[4].length?hr.apply(w,r):vr.apply(w,r),\r
+(p?qu:Zu)(n,r)}function mr(n,t,r,e,u,o,i){var f=-1,a=n.length,c=t.length;if(a!=c&&(!u||c<=a))return false;for(;++f<a;){var l=n[f],c=t[f],s=e?e(u?c:l,u?l:c,f):w;if(s!==w){if(s)continue;return false}if(u){if(!nt(t,function(n){return l===n||r(l,n,e,u,o,i)}))return false}else if(l!==c&&!r(l,c,e,u,o,i))return false}return true}function wr(n,t,r){switch(r){case D:case M:return+n==+t;case q:return n.name==t.name&&n.message==t.message;case V:return n!=+n?t!=+t:n==+t;case Y:case G:return n==t+""}return false}function xr(n,t,r,e,u,o,i){\r
+var f=Ko(n),a=f.length,c=Ko(t).length;if(a!=c&&!u)return false;for(c=a;c--;){var l=f[c];if(!(u?l in t:eu.call(t,l)))return false}for(var s=u;++c<a;){var l=f[c],p=n[l],h=t[l],_=e?e(u?h:p,u?p:h,l):w;if(_===w?!r(p,h,e,u,o,i):!_)return false;s||(s="constructor"==l)}return s||(r=n.constructor,e=t.constructor,!(r!=e&&"constructor"in n&&"constructor"in t)||typeof r=="function"&&r instanceof r&&typeof e=="function"&&e instanceof e)?true:false}function br(n,t,r){var e=Nn.callback||Le,e=e===Le?it:e;return r?e(n,t,r):e}function Ar(n){\r
+for(var t=n.name+"",r=Fu[t],e=r?r.length:0;e--;){var u=r[e],o=u.func;if(null==o||o==n)return u.name}return t}function jr(n,t,e){var u=Nn.indexOf||Yr,u=u===Yr?r:u;return n?u(n,t,e):u}function kr(n){n=Ce(n);for(var t=n.length;t--;){var r,e=n[t];r=n[t][1],r=r===r&&!de(r),e[2]=r}return n}function Or(n,t){var r=null==n?w:n[t];return me(r)?r:w}function Ir(n){var t=n.length,r=new n.constructor(t);return t&&"string"==typeof n[0]&&eu.call(n,"index")&&(r.index=n.index,r.input=n.input),r}function Rr(n){return n=n.constructor,\r
+typeof n=="function"&&n instanceof n||(n=Ye),new n}function Er(n,t,r){var e=n.constructor;switch(t){case J:return Mt(n);case D:case M:return new e(+n);case X:case H:case Q:case nn:case tn:case rn:case en:case un:case on:return e instanceof e&&(e=Lu[t]),t=n.buffer,new e(r?Mt(t):t,n.byteOffset,n.length);case V:case G:return new e(n);case Y:var u=new e(n.source,kn.exec(n));u.lastIndex=n.lastIndex}return u}function Cr(n,t,r){return null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),t=Gr(t)),\r
+t=null==n?n:n[t],null==t?w:t.apply(n,r)}function Sr(n){return null!=n&&Lr(Vu(n))}function Ur(n,t){return n=typeof n=="number"||Rn.test(n)?+n:-1,t=null==t?$u:t,-1<n&&0==n%1&&n<t}function $r(n,t,r){if(!de(r))return false;var e=typeof t;return("number"==e?Sr(r)&&Ur(t,r.length):"string"==e&&t in r)?(t=r[t],n===n?n===t:t!==t):false}function Wr(n,t){var r=typeof n;return"string"==r&&dn.test(n)||"number"==r?true:Wo(n)?false:!yn.test(n)||null!=t&&n in Dr(t)}function Fr(n){var t=Ar(n),r=Nn[t];return typeof r=="function"&&t in zn.prototype?n===r?true:(t=Ku(r),\r
+!!t&&n===t[0]):false}function Lr(n){return typeof n=="number"&&-1<n&&0==n%1&&n<=$u}function Nr(n,t){return n===w?t:Fo(n,t,Nr)}function Tr(n,t){n=Dr(n);for(var r=-1,e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u}function Pr(n,t){var r={};return vt(n,function(n,e,u){t(n,e,u)&&(r[e]=n)}),r}function zr(n){for(var t=Ee(n),r=t.length,e=r&&n.length,u=!!e&&Lr(e)&&(Wo(n)||_e(n)||Ae(n)),o=-1,i=[];++o<r;){var f=t[o];(u&&Ur(f,e)||eu.call(n,f))&&i.push(f)}return i}function Br(n){return null==n?[]:Sr(n)?Nn.support.unindexedChars&&Ae(n)?n.split(""):de(n)?n:Ye(n):Se(n);\r
+}function Dr(n){if(Nn.support.unindexedChars&&Ae(n)){for(var t=-1,r=n.length,e=Ye(n);++t<r;)e[t]=n.charAt(t);return e}return de(n)?n:Ye(n)}function Mr(n){if(Wo(n))return n;var t=[];return u(n).replace(mn,function(n,r,e,u){t.push(e?u.replace(An,"$1"):r||n)}),t}function qr(n){return n instanceof zn?n.clone():new Pn(n.__wrapped__,n.__chain__,qn(n.__actions__))}function Kr(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0>t?0:t)):[]}function Vr(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),\r
+t=e-(+t||0),St(n,0,0>t?0:t)):[]}function Zr(n){return n?n[0]:w}function Yr(n,t,e){var u=n?n.length:0;if(!u)return-1;if(typeof e=="number")e=0>e?ju(u+e,0):e;else if(e)return e=zt(n,t),e<u&&(t===t?t===n[e]:n[e]!==n[e])?e:-1;return r(n,t,e||0)}function Gr(n){var t=n?n.length:0;return t?n[t-1]:w}function Jr(n){return Kr(n,1)}function Xr(n,t,e,u){if(!n||!n.length)return[];null!=t&&typeof t!="boolean"&&(u=e,e=$r(n,t,u)?w:t,t=false);var o=br();if((null!=e||o!==it)&&(e=o(e,u,3)),t&&jr()===r){t=e;var i;e=-1,\r
+u=n.length;for(var o=-1,f=[];++e<u;){var a=n[e],c=t?t(a,e,n):a;e&&i===c||(i=c,f[++o]=a)}n=f}else n=Lt(n,e);return n}function Hr(n){if(!n||!n.length)return[];var t=-1,r=0;n=Zn(n,function(n){return Sr(n)?(r=ju(n.length,r),true):void 0});for(var e=De(r);++t<r;)e[t]=Xn(n,Ot(t));return e}function Qr(n,t,r){return n&&n.length?(n=Hr(n),null==t?n:(t=Dt(t,r,4),Xn(n,function(n){return Qn(n,t,w,true)}))):[]}function ne(n,t){var r=-1,e=n?n.length:0,u={};for(!e||t||Wo(n[0])||(t=[]);++r<e;){var o=n[r];t?u[o]=t[r]:o&&(u[o[0]]=o[1]);\r
+}return u}function te(n){return n=Nn(n),n.__chain__=true,n}function re(n,t,r){return t.call(r,n)}function ee(n,t,r){var e=Wo(n)?Vn:lt;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ue(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,t)}function oe(n,t,r,e){var u=n?Vu(n):0;return Lr(u)||(n=Se(n),u=n.length),r=typeof r!="number"||e&&$r(t,r,e)?0:0>r?ju(u+r,0):r||0,typeof n=="string"||!Wo(n)&&Ae(n)?r<=u&&-1<n.indexOf(t,r):!!u&&-1<jr(n,t,r)}function ie(n,t,r){var e=Wo(n)?Xn:bt;\r
+return t=br(t,r,3),e(n,t)}function fe(n,t,r){if(r?$r(n,t,r):null==t){n=Br(n);var e=n.length;return 0<e?n[Et(0,e-1)]:w}r=-1,n=Oe(n);var e=n.length,u=e-1;for(t=ku(0>t?0:+t||0,e);++r<t;){var e=Et(r,u),o=n[e];n[e]=n[r],n[r]=o}return n.length=t,n}function ae(n,t,r){var e=Wo(n)?nt:Ut;return r&&$r(n,t,r)&&(t=w),(typeof t!="function"||r!==w)&&(t=br(t,r,3)),e(n,t)}function ce(n,t){var r;if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);var e=n;n=t,t=e}return function(){return 0<--n&&(r=t.apply(this,arguments)),\r
+1>=n&&(t=w),r}}function le(n,t,r){function e(t,r){r&&cu(r),a=p=h=w,t&&(_=wo(),c=n.apply(s,f),p||a||(f=s=w))}function u(){var n=t-(wo()-l);0>=n||n>t?e(h,a):p=_u(u,n)}function o(){e(g,p)}function i(){if(f=arguments,l=wo(),s=this,h=g&&(p||!y),false===v)var r=y&&!p;else{a||y||(_=l);var e=v-(l-_),i=0>=e||e>v;i?(a&&(a=cu(a)),_=l,c=n.apply(s,f)):a||(a=_u(o,e))}return i&&p?p=cu(p):p||t===v||(p=_u(u,t)),r&&(i=true,c=n.apply(s,f)),!i||p||a||(f=s=w),c}var f,a,c,l,s,p,h,_=0,v=false,g=true;if(typeof n!="function")throw new Xe(T);\r
+if(t=0>t?0:+t||0,true===r)var y=true,g=false;else de(r)&&(y=!!r.leading,v="maxWait"in r&&ju(+r.maxWait||0,t),g="trailing"in r?!!r.trailing:g);return i.cancel=function(){p&&cu(p),a&&cu(a),_=0,a=p=h=w},i}function se(n,t){if(typeof n!="function"||t&&typeof t!="function")throw new Xe(T);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],o=r.cache;return o.has(u)?o.get(u):(e=n.apply(this,e),r.cache=o.set(u,e),e)};return r.cache=new se.Cache,r}function pe(n,t){if(typeof n!="function")throw new Xe(T);return t=ju(t===w?n.length-1:+t||0,0),\r
+function(){for(var r=arguments,e=-1,u=ju(r.length-t,0),o=De(u);++e<u;)o[e]=r[t+e];switch(t){case 0:return n.call(this,o);case 1:return n.call(this,r[0],o);case 2:return n.call(this,r[0],r[1],o)}for(u=De(t+1),e=-1;++e<t;)u[e]=r[e];return u[t]=o,n.apply(this,u)}}function he(n,t){return n>t}function _e(n){return h(n)&&Sr(n)&&eu.call(n,"callee")&&!pu.call(n,"callee")}function ve(n,t,r,e){return e=(r=typeof r=="function"?Dt(r,e,3):w)?r(n,t):w,e===w?wt(n,t,r):!!e}function ge(n){return h(n)&&typeof n.message=="string"&&ou.call(n)==q;\r
+}function ye(n){return de(n)&&ou.call(n)==K}function de(n){var t=typeof n;return!!n&&("object"==t||"function"==t)}function me(n){return null==n?false:ye(n)?fu.test(ru.call(n)):h(n)&&(Gn(n)?fu:In).test(n)}function we(n){return typeof n=="number"||h(n)&&ou.call(n)==V}function xe(n){var t;if(!h(n)||ou.call(n)!=Z||Gn(n)||_e(n)||!(eu.call(n,"constructor")||(t=n.constructor,typeof t!="function"||t instanceof t)))return false;var r;return Nn.support.ownLast?(vt(n,function(n,t,e){return r=eu.call(e,t),false}),false!==r):(vt(n,function(n,t){\r
+r=t}),r===w||eu.call(n,r))}function be(n){return de(n)&&ou.call(n)==Y}function Ae(n){return typeof n=="string"||h(n)&&ou.call(n)==G}function je(n){return h(n)&&Lr(n.length)&&!!Fn[ou.call(n)]}function ke(n,t){return n<t}function Oe(n){var t=n?Vu(n):0;return Lr(t)?t?Nn.support.unindexedChars&&Ae(n)?n.split(""):qn(n):[]:Se(n)}function Ie(n){return ot(n,Ee(n))}function Re(n){return dt(n,Ee(n))}function Ee(n){if(null==n)return[];de(n)||(n=Ye(n));for(var t=n.length,r=Nn.support,t=t&&Lr(t)&&(Wo(n)||_e(n)||Ae(n))&&t||0,e=n.constructor,u=-1,e=ye(e)&&e.prototype||nu,o=e===n,i=De(t),f=0<t,a=r.enumErrorProps&&(n===Qe||n instanceof qe),c=r.enumPrototypes&&ye(n);++u<t;)i[u]=u+"";\r
+for(var l in n)c&&"prototype"==l||a&&("message"==l||"name"==l)||f&&Ur(l,t)||"constructor"==l&&(o||!eu.call(n,l))||i.push(l);if(r.nonEnumShadows&&n!==nu)for(t=n===tu?G:n===Qe?q:ou.call(n),r=Nu[t]||Nu[Z],t==Z&&(e=nu),t=Wn.length;t--;)l=Wn[t],u=r[l],o&&u||(u?!eu.call(n,l):n[l]===e[l])||i.push(l);return i}function Ce(n){n=Dr(n);for(var t=-1,r=Ko(n),e=r.length,u=De(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u}function Se(n){return Nt(n,Ko(n))}function Ue(n){return(n=u(n))&&n.replace(En,a).replace(bn,"");\r
+}function $e(n,t){var r="";if(n=u(n),t=+t,1>t||!n||!bu(t))return r;do t%2&&(r+=n),t=wu(t/2),n+=n;while(t);return r}function We(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(g(n),y(n)+1):(t+="",n.slice(o(n,t),i(n,t)+1)):n}function Fe(n,t,r){return r&&$r(n,t,r)&&(t=w),n=u(n),n.match(t||Un)||[]}function Le(n,t,r){return r&&$r(n,t,r)&&(t=w),h(n)?Te(n):it(n,t)}function Ne(n){return n}function Te(n){return At(ft(n,true))}function Pe(n,t,r){if(null==r){var e=de(t),u=e?Ko(t):w;((u=u&&u.length?dt(t,u):w)?u.length:e)||(u=false,\r
+r=t,t=n,n=this)}u||(u=dt(t,Ko(t)));var o=true,e=-1,i=ye(n),f=u.length;false===r?o=false:de(r)&&"chain"in r&&(o=r.chain);for(;++e<f;){r=u[e];var a=t[r];n[r]=a,i&&(n.prototype[r]=function(t){return function(){var r=this.__chain__;if(o||r){var e=n(this.__wrapped__);return(e.__actions__=qn(this.__actions__)).push({func:t,args:arguments,thisArg:n}),e.__chain__=r,e}return t.apply(n,Hn([this.value()],arguments))}}(a))}return n}function ze(){}function Be(n){return Wr(n)?Ot(n):It(n)}_=_?Jn.defaults(Yn.Object(),_,Jn.pick(Yn,$n)):Yn;\r
+var De=_.Array,Me=_.Date,qe=_.Error,Ke=_.Function,Ve=_.Math,Ze=_.Number,Ye=_.Object,Ge=_.RegExp,Je=_.String,Xe=_.TypeError,He=De.prototype,Qe=qe.prototype,nu=Ye.prototype,tu=Je.prototype,ru=Ke.prototype.toString,eu=nu.hasOwnProperty,uu=0,ou=nu.toString,iu=Yn._,fu=Ge("^"+ru.call(eu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),au=_.ArrayBuffer,cu=_.clearTimeout,lu=_.parseFloat,su=Ve.pow,pu=nu.propertyIsEnumerable,hu=Or(_,"Set"),_u=_.setTimeout,vu=He.splice,gu=_.Uint8Array,yu=Or(_,"WeakMap"),du=Ve.ceil,mu=Or(Ye,"create"),wu=Ve.floor,xu=Or(De,"isArray"),bu=_.isFinite,Au=Or(Ye,"keys"),ju=Ve.max,ku=Ve.min,Ou=Or(Me,"now"),Iu=_.parseInt,Ru=Ve.random,Eu=Ze.NEGATIVE_INFINITY,Cu=Ze.POSITIVE_INFINITY,Su=4294967294,Uu=2147483647,$u=9007199254740991,Wu=yu&&new yu,Fu={},Lu={};\r
+Lu[X]=_.Float32Array,Lu[H]=_.Float64Array,Lu[Q]=_.Int8Array,Lu[nn]=_.Int16Array,Lu[tn]=_.Int32Array,Lu[rn]=gu,Lu[en]=_.Uint8ClampedArray,Lu[un]=_.Uint16Array,Lu[on]=_.Uint32Array;var Nu={};Nu[B]=Nu[M]=Nu[V]={constructor:true,toLocaleString:true,toString:true,valueOf:true},Nu[D]=Nu[G]={constructor:true,toString:true,valueOf:true},Nu[q]=Nu[K]=Nu[Y]={constructor:true,toString:true},Nu[Z]={constructor:true},Kn(Wn,function(n){for(var t in Nu)if(eu.call(Nu,t)){var r=Nu[t];r[n]=eu.call(r,n)}});var Tu=Nn.support={};!function(n){\r
+var t=function(){this.x=n},r={0:n,length:n},e=[];t.prototype={valueOf:n,y:n};for(var u in new t)e.push(u);Tu.enumErrorProps=pu.call(Qe,"message")||pu.call(Qe,"name"),Tu.enumPrototypes=pu.call(t,"prototype"),Tu.nonEnumShadows=!/valueOf/.test(e),Tu.ownLast="x"!=e[0],Tu.spliceObjects=(vu.call(r,0,1),!r[0]),Tu.unindexedChars="xx"!="x"[0]+Ye("x")[0]}(1,0),Nn.templateSettings={escape:_n,evaluate:vn,interpolate:gn,variable:"",imports:{_:Nn}};var Pu=function(){function n(){}return function(t){if(de(t)){n.prototype=t;\r
+var r=new n;n.prototype=w}return r||{}}}(),zu=Yt(gt),Bu=Yt(yt,true),Du=Gt(),Mu=Gt(true),qu=Wu?function(n,t){return Wu.set(n,t),n}:Ne,Ku=Wu?function(n){return Wu.get(n)}:ze,Vu=Ot("length"),Zu=function(){var n=0,t=0;return function(r,e){var u=wo(),o=W-(u-t);if(t=u,0<o){if(++n>=$)return r}else n=0;return qu(r,e)}}(),Yu=pe(function(n,t){return h(n)&&Sr(n)?ct(n,_t(t,false,true)):[]}),Gu=er(),Ju=er(true),Xu=pe(function(n){for(var t=n.length,e=t,u=De(l),o=jr(),i=o===r,f=[];e--;){var a=n[e]=Sr(a=n[e])?a:[];u[e]=i&&120<=a.length&&mu&&hu?new Dn(e&&a):null;\r
+}var i=n[0],c=-1,l=i?i.length:0,s=u[0];n:for(;++c<l;)if(a=i[c],0>(s?Mn(s,a):o(f,a,0))){for(e=t;--e;){var p=u[e];if(0>(p?Mn(p,a):o(n[e],a,0)))continue n}s&&s.push(a),f.push(a)}return f}),Hu=pe(function(t,r){r=_t(r);var e=ut(t,r);return Rt(t,r.sort(n)),e}),Qu=yr(),no=yr(true),to=pe(function(n){return Lt(_t(n,false,true))}),ro=pe(function(n,t){return Sr(n)?ct(n,t):[]}),eo=pe(Hr),uo=pe(function(n){var t=n.length,r=2<t?n[t-2]:w,e=1<t?n[t-1]:w;return 2<t&&typeof r=="function"?t-=2:(r=1<t&&typeof e=="function"?(--t,\r
+e):w,e=w),n.length=t,Qr(n,r,e)}),oo=pe(function(n){return n=_t(n),this.thru(function(t){t=Wo(t)?t:[Dr(t)];for(var r=n,e=-1,u=t.length,o=-1,i=r.length,f=De(u+i);++e<u;)f[e]=t[e];for(;++o<i;)f[e++]=r[o];return f})}),io=pe(function(n,t){return Sr(n)&&(n=Br(n)),ut(n,_t(t))}),fo=Vt(function(n,t,r){eu.call(n,r)?++n[r]:n[r]=1}),ao=rr(zu),co=rr(Bu,true),lo=ir(Kn,zu),so=ir(function(n,t){for(var r=n.length;r--&&false!==t(n[r],r,n););return n},Bu),po=Vt(function(n,t,r){eu.call(n,r)?n[r].push(t):n[r]=[t]}),ho=Vt(function(n,t,r){\r
+n[r]=t}),_o=pe(function(n,t,r){var e=-1,u=typeof t=="function",o=Wr(t),i=Sr(n)?De(n.length):[];return zu(n,function(n){var f=u?t:o&&null!=n?n[t]:w;i[++e]=f?f.apply(n,r):Cr(n,t,r)}),i}),vo=Vt(function(n,t,r){n[r?0:1].push(t)},function(){return[[],[]]}),go=pr(Qn,zu),yo=pr(function(n,t,r,e){var u=n.length;for(e&&u&&(r=n[--u]);u--;)r=t(r,n[u],u,n);return r},Bu),mo=pe(function(n,t){if(null==n)return[];var r=t[2];return r&&$r(t[0],t[1],r)&&(t.length=1),Wt(n,_t(t),[])}),wo=Ou||function(){return(new Me).getTime();\r
+},xo=pe(function(n,t,r){var e=b;if(r.length)var u=v(r,xo.placeholder),e=e|I;return dr(n,e,t,r,u)}),bo=pe(function(n,t){t=t.length?_t(t):Re(n);for(var r=-1,e=t.length;++r<e;){var u=t[r];n[u]=dr(n[u],b,n)}return n}),Ao=pe(function(n,t,r){var e=b|A;if(r.length)var u=v(r,Ao.placeholder),e=e|I;return dr(t,e,n,r,u)}),jo=Qt(k),ko=Qt(O),Oo=pe(function(n,t){return at(n,1,t)}),Io=pe(function(n,t,r){return at(n,t,r)}),Ro=or(),Eo=or(true),Co=pe(function(n,t){if(t=_t(t),typeof n!="function"||!Vn(t,e))throw new Xe(T);\r
+var r=t.length;return pe(function(e){for(var u=ku(e.length,r);u--;)e[u]=t[u](e[u]);return n.apply(this,e)})}),So=sr(I),Uo=sr(R),$o=pe(function(n,t){return dr(n,C,w,w,w,_t(t))}),Wo=xu||function(n){return h(n)&&Lr(n.length)&&ou.call(n)==B},Fo=Zt(kt),Lo=Zt(function(n,t,r){return r?rt(n,t,r):et(n,t)}),No=nr(Lo,function(n,t){return n===w?t:n}),To=nr(Fo,Nr),Po=ur(gt),zo=ur(yt),Bo=fr(Du),Do=fr(Mu),Mo=ar(gt),qo=ar(yt),Ko=Au?function(n){var t=null==n?w:n.constructor;return typeof t=="function"&&t.prototype===n||(typeof n=="function"?Nn.support.enumPrototypes:Sr(n))?zr(n):de(n)?Au(n):[];\r
+}:zr,Vo=cr(true),Zo=cr(),Yo=pe(function(n,t){if(null==n)return{};if("function"!=typeof t[0])return t=Xn(_t(t),Je),Tr(n,ct(Ee(n),t));var r=Dt(t[0],t[1],3);return Pr(n,function(n,t,e){return!r(n,t,e)})}),Go=pe(function(n,t){return null==n?{}:"function"==typeof t[0]?Pr(n,Dt(t[0],t[1],3)):Tr(n,_t(t))}),Jo=Xt(function(n,t,r){return t=t.toLowerCase(),n+(r?t.charAt(0).toUpperCase()+t.slice(1):t)}),Xo=Xt(function(n,t,r){return n+(r?"-":"")+t.toLowerCase()}),Ho=lr(),Qo=lr(true),ni=Xt(function(n,t,r){return n+(r?"_":"")+t.toLowerCase();\r
+}),ti=Xt(function(n,t,r){return n+(r?" ":"")+(t.charAt(0).toUpperCase()+t.slice(1))}),ri=pe(function(n,t){try{return n.apply(w,t)}catch(r){return ge(r)?r:new qe(r)}}),ei=pe(function(n,t){return function(r){return Cr(r,n,t)}}),ui=pe(function(n,t){return function(r){return Cr(n,r,t)}}),oi=gr("ceil"),ii=gr("floor"),fi=tr(he,Eu),ai=tr(ke,Cu),ci=gr("round");return Nn.prototype=Tn.prototype,Pn.prototype=Pu(Tn.prototype),Pn.prototype.constructor=Pn,zn.prototype=Pu(Tn.prototype),zn.prototype.constructor=zn,\r
+Bn.prototype["delete"]=function(n){return this.has(n)&&delete this.__data__[n]},Bn.prototype.get=function(n){return"__proto__"==n?w:this.__data__[n]},Bn.prototype.has=function(n){return"__proto__"!=n&&eu.call(this.__data__,n)},Bn.prototype.set=function(n,t){return"__proto__"!=n&&(this.__data__[n]=t),this},Dn.prototype.push=function(n){var t=this.data;typeof n=="string"||de(n)?t.set.add(n):t.hash[n]=true},se.Cache=Bn,Nn.after=function(n,t){if(typeof t!="function"){if(typeof n!="function")throw new Xe(T);\r
+var r=n;n=t,t=r}return n=bu(n=+n)?n:0,function(){return 1>--n?t.apply(this,arguments):void 0}},Nn.ary=function(n,t,r){return r&&$r(n,t,r)&&(t=w),t=n&&null==t?n.length:ju(+t||0,0),dr(n,E,w,w,w,w,t)},Nn.assign=Lo,Nn.at=io,Nn.before=ce,Nn.bind=xo,Nn.bindAll=bo,Nn.bindKey=Ao,Nn.callback=Le,Nn.chain=te,Nn.chunk=function(n,t,r){t=(r?$r(n,t,r):null==t)?1:ju(wu(t)||1,1),r=0;for(var e=n?n.length:0,u=-1,o=De(du(e/t));r<e;)o[++u]=St(n,r,r+=t);return o},Nn.compact=function(n){for(var t=-1,r=n?n.length:0,e=-1,u=[];++t<r;){\r
+var o=n[t];o&&(u[++e]=o)}return u},Nn.constant=function(n){return function(){return n}},Nn.countBy=fo,Nn.create=function(n,t,r){var e=Pu(n);return r&&$r(n,t,r)&&(t=w),t?et(e,t):e},Nn.curry=jo,Nn.curryRight=ko,Nn.debounce=le,Nn.defaults=No,Nn.defaultsDeep=To,Nn.defer=Oo,Nn.delay=Io,Nn.difference=Yu,Nn.drop=Kr,Nn.dropRight=Vr,Nn.dropRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true,true):[]},Nn.dropWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),true):[]},Nn.fill=function(n,t,r,e){\r
+var u=n?n.length:0;if(!u)return[];for(r&&typeof r!="number"&&$r(n,t,r)&&(r=0,e=u),u=n.length,r=null==r?0:+r||0,0>r&&(r=-r>u?0:u+r),e=e===w||e>u?u:+e||0,0>e&&(e+=u),u=r>e?0:e>>>0,r>>>=0;r<u;)n[r++]=t;return n},Nn.filter=ue,Nn.flatten=function(n,t,r){var e=n?n.length:0;return r&&$r(n,t,r)&&(t=false),e?_t(n,t):[]},Nn.flattenDeep=function(n){return n&&n.length?_t(n,true):[]},Nn.flow=Ro,Nn.flowRight=Eo,Nn.forEach=lo,Nn.forEachRight=so,Nn.forIn=Bo,Nn.forInRight=Do,Nn.forOwn=Mo,Nn.forOwnRight=qo,Nn.functions=Re,\r
+Nn.groupBy=po,Nn.indexBy=ho,Nn.initial=function(n){return Vr(n,1)},Nn.intersection=Xu,Nn.invert=function(n,t,r){r&&$r(n,t,r)&&(t=w),r=-1;for(var e=Ko(n),u=e.length,o={};++r<u;){var i=e[r],f=n[i];t?eu.call(o,f)?o[f].push(i):o[f]=[i]:o[f]=i}return o},Nn.invoke=_o,Nn.keys=Ko,Nn.keysIn=Ee,Nn.map=ie,Nn.mapKeys=Vo,Nn.mapValues=Zo,Nn.matches=Te,Nn.matchesProperty=function(n,t){return jt(n,ft(t,true))},Nn.memoize=se,Nn.merge=Fo,Nn.method=ei,Nn.methodOf=ui,Nn.mixin=Pe,Nn.modArgs=Co,Nn.negate=function(n){if(typeof n!="function")throw new Xe(T);\r
+return function(){return!n.apply(this,arguments)}},Nn.omit=Yo,Nn.once=function(n){return ce(2,n)},Nn.pairs=Ce,Nn.partial=So,Nn.partialRight=Uo,Nn.partition=vo,Nn.pick=Go,Nn.pluck=function(n,t){return ie(n,Be(t))},Nn.property=Be,Nn.propertyOf=function(n){return function(t){return mt(n,Mr(t),t+"")}},Nn.pull=function(){var n=arguments,t=n[0];if(!t||!t.length)return t;for(var r=0,e=jr(),u=n.length;++r<u;)for(var o=0,i=n[r];-1<(o=e(t,i,o));)vu.call(t,o,1);return t},Nn.pullAt=Hu,Nn.range=function(n,t,r){\r
+r&&$r(n,t,r)&&(t=r=w),n=+n||0,r=null==r?1:+r||0,null==t?(t=n,n=0):t=+t||0;var e=-1;t=ju(du((t-n)/(r||1)),0);for(var u=De(t);++e<t;)u[e]=n,n+=r;return u},Nn.rearg=$o,Nn.reject=function(n,t,r){var e=Wo(n)?Zn:pt;return t=br(t,r,3),e(n,function(n,r,e){return!t(n,r,e)})},Nn.remove=function(n,t,r){var e=[];if(!n||!n.length)return e;var u=-1,o=[],i=n.length;for(t=br(t,r,3);++u<i;)r=n[u],t(r,u,n)&&(e.push(r),o.push(u));return Rt(n,o),e},Nn.rest=Jr,Nn.restParam=pe,Nn.set=function(n,t,r){if(null==n)return n;\r
+var e=t+"";t=null!=n[e]||Wr(t,n)?[e]:Mr(t);for(var e=-1,u=t.length,o=u-1,i=n;null!=i&&++e<u;){var f=t[e];de(i)&&(e==o?i[f]=r:null==i[f]&&(i[f]=Ur(t[e+1])?[]:{})),i=i[f]}return n},Nn.shuffle=function(n){return fe(n,Cu)},Nn.slice=function(n,t,r){var e=n?n.length:0;return e?(r&&typeof r!="number"&&$r(n,t,r)&&(t=0,r=e),St(n,t,r)):[]},Nn.sortBy=function(n,t,r){if(null==n)return[];r&&$r(n,t,r)&&(t=w);var e=-1;return t=br(t,r,3),n=bt(n,function(n,r,u){return{a:t(n,r,u),b:++e,c:n}}),$t(n,f)},Nn.sortByAll=mo,\r
+Nn.sortByOrder=function(n,t,r,e){return null==n?[]:(e&&$r(t,r,e)&&(r=w),Wo(t)||(t=null==t?[]:[t]),Wo(r)||(r=null==r?[]:[r]),Wt(n,t,r))},Nn.spread=function(n){if(typeof n!="function")throw new Xe(T);return function(t){return n.apply(this,t)}},Nn.take=function(n,t,r){return n&&n.length?((r?$r(n,t,r):null==t)&&(t=1),St(n,0,0>t?0:t)):[]},Nn.takeRight=function(n,t,r){var e=n?n.length:0;return e?((r?$r(n,t,r):null==t)&&(t=1),t=e-(+t||0),St(n,0>t?0:t)):[]},Nn.takeRightWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3),false,true):[];\r
+},Nn.takeWhile=function(n,t,r){return n&&n.length?Tt(n,br(t,r,3)):[]},Nn.tap=function(n,t,r){return t.call(r,n),n},Nn.throttle=function(n,t,r){var e=true,u=true;if(typeof n!="function")throw new Xe(T);return false===r?e=false:de(r)&&(e="leading"in r?!!r.leading:e,u="trailing"in r?!!r.trailing:u),le(n,t,{leading:e,maxWait:+t,trailing:u})},Nn.thru=re,Nn.times=function(n,t,r){if(n=wu(n),1>n||!bu(n))return[];var e=-1,u=De(ku(n,4294967295));for(t=Dt(t,r,1);++e<n;)4294967295>e?u[e]=t(e):t(e);return u},Nn.toArray=Oe,\r
+Nn.toPlainObject=Ie,Nn.transform=function(n,t,r,e){var u=Wo(n)||je(n);return t=br(t,e,4),null==r&&(u||de(n)?(e=n.constructor,r=u?Wo(n)?new e:[]:Pu(ye(e)?e.prototype:w)):r={}),(u?Kn:gt)(n,function(n,e,u){return t(r,n,e,u)}),r},Nn.union=to,Nn.uniq=Xr,Nn.unzip=Hr,Nn.unzipWith=Qr,Nn.values=Se,Nn.valuesIn=function(n){return Nt(n,Ee(n))},Nn.where=function(n,t){return ue(n,At(t))},Nn.without=ro,Nn.wrap=function(n,t){return t=null==t?Ne:t,dr(t,I,w,[n],[])},Nn.xor=function(){for(var n=-1,t=arguments.length;++n<t;){\r
+var r=arguments[n];if(Sr(r))var e=e?Hn(ct(e,r),ct(r,e)):r}return e?Lt(e):[]},Nn.zip=eo,Nn.zipObject=ne,Nn.zipWith=uo,Nn.backflow=Eo,Nn.collect=ie,Nn.compose=Eo,Nn.each=lo,Nn.eachRight=so,Nn.extend=Lo,Nn.iteratee=Le,Nn.methods=Re,Nn.object=ne,Nn.select=ue,Nn.tail=Jr,Nn.unique=Xr,Pe(Nn,Nn),Nn.add=function(n,t){return(+n||0)+(+t||0)},Nn.attempt=ri,Nn.camelCase=Jo,Nn.capitalize=function(n){return(n=u(n))&&n.charAt(0).toUpperCase()+n.slice(1)},Nn.ceil=oi,Nn.clone=function(n,t,r,e){return t&&typeof t!="boolean"&&$r(n,t,r)?t=false:typeof t=="function"&&(e=r,\r
+r=t,t=false),typeof r=="function"?ft(n,t,Dt(r,e,3)):ft(n,t)},Nn.cloneDeep=function(n,t,r){return typeof t=="function"?ft(n,true,Dt(t,r,3)):ft(n,true)},Nn.deburr=Ue,Nn.endsWith=function(n,t,r){n=u(n),t+="";var e=n.length;return r=r===w?e:ku(0>r?0:+r||0,e),r-=t.length,0<=r&&n.indexOf(t,r)==r},Nn.escape=function(n){return(n=u(n))&&hn.test(n)?n.replace(sn,c):n},Nn.escapeRegExp=function(n){return(n=u(n))&&xn.test(n)?n.replace(wn,l):n||"(?:)"},Nn.every=ee,Nn.find=ao,Nn.findIndex=Gu,Nn.findKey=Po,Nn.findLast=co,\r
+Nn.findLastIndex=Ju,Nn.findLastKey=zo,Nn.findWhere=function(n,t){return ao(n,At(t))},Nn.first=Zr,Nn.floor=ii,Nn.get=function(n,t,r){return n=null==n?w:mt(n,Mr(t),t+""),n===w?r:n},Nn.gt=he,Nn.gte=function(n,t){return n>=t},Nn.has=function(n,t){if(null==n)return false;var r=eu.call(n,t);if(!r&&!Wr(t)){if(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),null==n)return false;t=Gr(t),r=eu.call(n,t)}return r||Lr(n.length)&&Ur(t,n.length)&&(Wo(n)||_e(n)||Ae(n))},Nn.identity=Ne,Nn.includes=oe,Nn.indexOf=Yr,Nn.inRange=function(n,t,r){\r
+return t=+t||0,r===w?(r=t,t=0):r=+r||0,n>=ku(t,r)&&n<ju(t,r)},Nn.isArguments=_e,Nn.isArray=Wo,Nn.isBoolean=function(n){return true===n||false===n||h(n)&&ou.call(n)==D},Nn.isDate=function(n){return h(n)&&ou.call(n)==M},Nn.isElement=function(n){return!!n&&1===n.nodeType&&h(n)&&!xe(n)},Nn.isEmpty=function(n){return null==n?true:Sr(n)&&(Wo(n)||Ae(n)||_e(n)||h(n)&&ye(n.splice))?!n.length:!Ko(n).length},Nn.isEqual=ve,Nn.isError=ge,Nn.isFinite=function(n){return typeof n=="number"&&bu(n)},Nn.isFunction=ye,Nn.isMatch=function(n,t,r,e){\r
+return r=typeof r=="function"?Dt(r,e,3):w,xt(n,kr(t),r)},Nn.isNaN=function(n){return we(n)&&n!=+n},Nn.isNative=me,Nn.isNull=function(n){return null===n},Nn.isNumber=we,Nn.isObject=de,Nn.isPlainObject=xe,Nn.isRegExp=be,Nn.isString=Ae,Nn.isTypedArray=je,Nn.isUndefined=function(n){return n===w},Nn.kebabCase=Xo,Nn.last=Gr,Nn.lastIndexOf=function(n,t,r){var e=n?n.length:0;if(!e)return-1;var u=e;if(typeof r=="number")u=(0>r?ju(e+r,0):ku(r||0,e-1))+1;else if(r)return u=zt(n,t,true)-1,n=n[u],(t===t?t===n:n!==n)?u:-1;\r
+if(t!==t)return p(n,u,true);for(;u--;)if(n[u]===t)return u;return-1},Nn.lt=ke,Nn.lte=function(n,t){return n<=t},Nn.max=fi,Nn.min=ai,Nn.noConflict=function(){return Yn._=iu,this},Nn.noop=ze,Nn.now=wo,Nn.pad=function(n,t,r){n=u(n),t=+t;var e=n.length;return e<t&&bu(t)?(e=(t-e)/2,t=wu(e),e=du(e),r=_r("",e,r),r.slice(0,t)+n+r):n},Nn.padLeft=Ho,Nn.padRight=Qo,Nn.parseInt=function(n,t,r){return(r?$r(n,t,r):null==t)?t=0:t&&(t=+t),n=We(n),Iu(n,t||(On.test(n)?16:10))},Nn.random=function(n,t,r){r&&$r(n,t,r)&&(t=r=w);\r
+var e=null==n,u=null==t;return null==r&&(u&&typeof n=="boolean"?(r=n,n=1):typeof t=="boolean"&&(r=t,u=true)),e&&u&&(t=1,u=false),n=+n||0,u?(t=n,n=0):t=+t||0,r||n%1||t%1?(r=Ru(),ku(n+r*(t-n+lu("1e-"+((r+"").length-1))),t)):Et(n,t)},Nn.reduce=go,Nn.reduceRight=yo,Nn.repeat=$e,Nn.result=function(n,t,r){var e=null==n?w:Dr(n)[t];return e===w&&(null==n||Wr(t,n)||(t=Mr(t),n=1==t.length?n:mt(n,St(t,0,-1)),e=null==n?w:Dr(n)[Gr(t)]),e=e===w?r:e),ye(e)?e.call(n):e},Nn.round=ci,Nn.runInContext=m,Nn.size=function(n){\r
+var t=n?Vu(n):0;return Lr(t)?t:Ko(n).length},Nn.snakeCase=ni,Nn.some=ae,Nn.sortedIndex=Qu,Nn.sortedLastIndex=no,Nn.startCase=ti,Nn.startsWith=function(n,t,r){return n=u(n),r=null==r?0:ku(0>r?0:+r||0,n.length),n.lastIndexOf(t,r)==r},Nn.sum=function(n,t,r){if(r&&$r(n,t,r)&&(t=w),t=br(t,r,3),1==t.length){n=Wo(n)?n:Br(n),r=n.length;for(var e=0;r--;)e+=+t(n[r])||0;n=e}else n=Ft(n,t);return n},Nn.template=function(n,t,r){var e=Nn.templateSettings;r&&$r(n,t,r)&&(t=r=w),n=u(n),t=rt(et({},r||t),e,tt),r=rt(et({},t.imports),e.imports,tt);\r
+var o,i,f=Ko(r),a=Nt(r,f),c=0;r=t.interpolate||Cn;var l="__p+='";r=Ge((t.escape||Cn).source+"|"+r.source+"|"+(r===gn?jn:Cn).source+"|"+(t.evaluate||Cn).source+"|$","g");var p="sourceURL"in t?"//# sourceURL="+t.sourceURL+"\n":"";if(n.replace(r,function(t,r,e,u,f,a){return e||(e=u),l+=n.slice(c,a).replace(Sn,s),r&&(o=true,l+="'+__e("+r+")+'"),f&&(i=true,l+="';"+f+";\n__p+='"),e&&(l+="'+((__t=("+e+"))==null?'':__t)+'"),c=a+t.length,t}),l+="';",(t=t.variable)||(l="with(obj){"+l+"}"),l=(i?l.replace(fn,""):l).replace(an,"$1").replace(cn,"$1;"),\r
+l="function("+(t||"obj")+"){"+(t?"":"obj||(obj={});")+"var __t,__p=''"+(o?",__e=_.escape":"")+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}",t=ri(function(){return Ke(f,p+"return "+l).apply(w,a)}),t.source=l,ge(t))throw t;return t},Nn.trim=We,Nn.trimLeft=function(n,t,r){var e=n;return(n=u(n))?n.slice((r?$r(e,t,r):null==t)?g(n):o(n,t+"")):n},Nn.trimRight=function(n,t,r){var e=n;return(n=u(n))?(r?$r(e,t,r):null==t)?n.slice(0,y(n)+1):n.slice(0,i(n,t+"")+1):n;\r
+},Nn.trunc=function(n,t,r){r&&$r(n,t,r)&&(t=w);var e=S;if(r=U,null!=t)if(de(t)){var o="separator"in t?t.separator:o,e="length"in t?+t.length||0:e;r="omission"in t?u(t.omission):r}else e=+t||0;if(n=u(n),e>=n.length)return n;if(e-=r.length,1>e)return r;if(t=n.slice(0,e),null==o)return t+r;if(be(o)){if(n.slice(e).search(o)){var i,f=n.slice(0,e);for(o.global||(o=Ge(o.source,(kn.exec(o)||"")+"g")),o.lastIndex=0;n=o.exec(f);)i=n.index;t=t.slice(0,null==i?e:i)}}else n.indexOf(o,e)!=e&&(o=t.lastIndexOf(o),\r
+-1<o&&(t=t.slice(0,o)));return t+r},Nn.unescape=function(n){return(n=u(n))&&pn.test(n)?n.replace(ln,d):n},Nn.uniqueId=function(n){var t=++uu;return u(n)+t},Nn.words=Fe,Nn.all=ee,Nn.any=ae,Nn.contains=oe,Nn.eq=ve,Nn.detect=ao,Nn.foldl=go,Nn.foldr=yo,Nn.head=Zr,Nn.include=oe,Nn.inject=go,Pe(Nn,function(){var n={};return gt(Nn,function(t,r){Nn.prototype[r]||(n[r]=t)}),n}(),false),Nn.sample=fe,Nn.prototype.sample=function(n){return this.__chain__||null!=n?this.thru(function(t){return fe(t,n)}):fe(this.value());\r
+},Nn.VERSION=x,Kn("bind bindKey curry curryRight partial partialRight".split(" "),function(n){Nn[n].placeholder=Nn}),Kn(["drop","take"],function(n,t){zn.prototype[n]=function(r){var e=this.__filtered__;if(e&&!t)return new zn(this);r=null==r?1:ju(wu(r)||0,0);var u=this.clone();return e?u.__takeCount__=ku(u.__takeCount__,r):u.__views__.push({size:r,type:n+(0>u.__dir__?"Right":"")}),u},zn.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Kn(["filter","map","takeWhile"],function(n,t){\r
+var r=t+1,e=r!=N;zn.prototype[n]=function(n,t){var u=this.clone();return u.__iteratees__.push({iteratee:br(n,t,1),type:r}),u.__filtered__=u.__filtered__||e,u}}),Kn(["first","last"],function(n,t){var r="take"+(t?"Right":"");zn.prototype[n]=function(){return this[r](1).value()[0]}}),Kn(["initial","rest"],function(n,t){var r="drop"+(t?"":"Right");zn.prototype[n]=function(){return this.__filtered__?new zn(this):this[r](1)}}),Kn(["pluck","where"],function(n,t){var r=t?"filter":"map",e=t?At:Be;zn.prototype[n]=function(n){\r
+return this[r](e(n))}}),zn.prototype.compact=function(){return this.filter(Ne)},zn.prototype.reject=function(n,t){return n=br(n,t,1),this.filter(function(t){return!n(t)})},zn.prototype.slice=function(n,t){n=null==n?0:+n||0;var r=this;return r.__filtered__&&(0<n||0>t)?new zn(r):(0>n?r=r.takeRight(-n):n&&(r=r.drop(n)),t!==w&&(t=+t||0,r=0>t?r.dropRight(-t):r.take(t-n)),r)},zn.prototype.takeRightWhile=function(n,t){return this.reverse().takeWhile(n,t).reverse()},zn.prototype.toArray=function(){return this.take(Cu);\r
+},gt(zn.prototype,function(n,t){var r=/^(?:filter|map|reject)|While$/.test(t),e=/^(?:first|last)$/.test(t),u=Nn[e?"take"+("last"==t?"Right":""):t];u&&(Nn.prototype[t]=function(){var t=e?[1]:arguments,o=this.__chain__,i=this.__wrapped__,f=!!this.__actions__.length,a=i instanceof zn,c=t[0],l=a||Wo(i);l&&r&&typeof c=="function"&&1!=c.length&&(a=l=false);var s=function(n){return e&&o?u(n,1)[0]:u.apply(w,Hn([n],t))},c={func:re,args:[s],thisArg:w},f=a&&!f;return e&&!o?f?(i=i.clone(),i.__actions__.push(c),\r
+n.call(i)):u.call(w,this.value())[0]:!e&&l?(i=f?i:new zn(this),i=n.apply(i,t),i.__actions__.push(c),new Pn(i,o)):this.thru(s)})}),Kn("join pop push replace shift sort splice split unshift".split(" "),function(n){var t=(/^(?:replace|split)$/.test(n)?tu:He)[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=!Tu.spliceObjects&&/^(?:pop|shift|splice)$/.test(n),u=/^(?:join|pop|replace|shift)$/.test(n),o=e?function(){var n=t.apply(this,arguments);return 0===this.length&&delete this[0],n}:t;Nn.prototype[n]=function(){\r
+var n=arguments;return u&&!this.__chain__?o.apply(this.value(),n):this[r](function(t){return o.apply(t,n)})}}),gt(zn.prototype,function(n,t){var r=Nn[t];if(r){var e=r.name+"";(Fu[e]||(Fu[e]=[])).push({name:t,func:r})}}),Fu[hr(w,A).name]=[{name:"wrapper",func:w}],zn.prototype.clone=function(){var n=new zn(this.__wrapped__);return n.__actions__=qn(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=qn(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=qn(this.__views__),\r
+n},zn.prototype.reverse=function(){if(this.__filtered__){var n=new zn(this);n.__dir__=-1,n.__filtered__=true}else n=this.clone(),n.__dir__*=-1;return n},zn.prototype.value=function(){var n,t=this.__wrapped__.value(),r=this.__dir__,e=Wo(t),u=0>r,o=e?t.length:0;n=0;for(var i=o,f=this.__views__,a=-1,c=f.length;++a<c;){var l=f[a],s=l.size;switch(l.type){case"drop":n+=s;break;case"dropRight":i-=s;break;case"take":i=ku(i,n+s);break;case"takeRight":n=ju(n,i-s)}}if(n={start:n,end:i},i=n.start,f=n.end,n=f-i,\r
+u=u?f:i-1,i=this.__iteratees__,f=i.length,a=0,c=ku(n,this.__takeCount__),!e||o<F||o==n&&c==n)return Pt(t,this.__actions__);e=[];n:for(;n--&&a<c;){for(u+=r,o=-1,l=t[u];++o<f;){var p=i[o],s=p.type,p=p.iteratee(l);if(s==N)l=p;else if(!p){if(s==L)continue n;break n}}e[a++]=l}return e},Nn.prototype.chain=function(){return te(this)},Nn.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},Nn.prototype.concat=oo,Nn.prototype.plant=function(n){for(var t,r=this;r instanceof Tn;){var e=qr(r);\r
+t?u.__wrapped__=e:t=e;var u=e,r=r.__wrapped__}return u.__wrapped__=n,t},Nn.prototype.reverse=function(){var n=this.__wrapped__,t=function(n){return n.reverse()};return n instanceof zn?(this.__actions__.length&&(n=new zn(this)),n=n.reverse(),n.__actions__.push({func:re,args:[t],thisArg:w}),new Pn(n,this.__chain__)):this.thru(t)},Nn.prototype.toString=function(){return this.value()+""},Nn.prototype.run=Nn.prototype.toJSON=Nn.prototype.valueOf=Nn.prototype.value=function(){return Pt(this.__wrapped__,this.__actions__);\r
+},Nn.prototype.collect=Nn.prototype.map,Nn.prototype.head=Nn.prototype.first,Nn.prototype.select=Nn.prototype.filter,Nn.prototype.tail=Nn.prototype.rest,Nn}var w,x="3.10.1",b=1,A=2,j=4,k=8,O=16,I=32,R=64,E=128,C=256,S=30,U="...",$=150,W=16,F=200,L=1,N=2,T="Expected a function",P="__lodash_placeholder__",z="[object Arguments]",B="[object Array]",D="[object Boolean]",M="[object Date]",q="[object Error]",K="[object Function]",V="[object Number]",Z="[object Object]",Y="[object RegExp]",G="[object String]",J="[object ArrayBuffer]",X="[object Float32Array]",H="[object Float64Array]",Q="[object Int8Array]",nn="[object Int16Array]",tn="[object Int32Array]",rn="[object Uint8Array]",en="[object Uint8ClampedArray]",un="[object Uint16Array]",on="[object Uint32Array]",fn=/\b__p\+='';/g,an=/\b(__p\+=)''\+/g,cn=/(__e\(.*?\)|\b__t\))\+'';/g,ln=/&(?:amp|lt|gt|quot|#39|#96);/g,sn=/[&<>"'`]/g,pn=RegExp(ln.source),hn=RegExp(sn.source),_n=/<%-([\s\S]+?)%>/g,vn=/<%([\s\S]+?)%>/g,gn=/<%=([\s\S]+?)%>/g,yn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,dn=/^\w*$/,mn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,wn=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,xn=RegExp(wn.source),bn=/[\u0300-\u036f\ufe20-\ufe23]/g,An=/\\(\\)?/g,jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,kn=/\w*$/,On=/^0[xX]/,In=/^\[object .+?Constructor\]$/,Rn=/^\d+$/,En=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Cn=/($^)/,Sn=/['\n\r\u2028\u2029\\]/g,Un=RegExp("[A-Z\\xc0-\\xd6\\xd8-\\xde]+(?=[A-Z\\xc0-\\xd6\\xd8-\\xde][a-z\\xdf-\\xf6\\xf8-\\xff]+)|[A-Z\\xc0-\\xd6\\xd8-\\xde]?[a-z\\xdf-\\xf6\\xf8-\\xff]+|[A-Z\\xc0-\\xd6\\xd8-\\xde]+|[0-9]+","g"),$n="Array ArrayBuffer Date Error Float32Array Float64Array Function Int8Array Int16Array Int32Array Math Number Object RegExp Set String _ clearTimeout isFinite parseFloat parseInt setTimeout TypeError Uint8Array Uint8ClampedArray Uint16Array Uint32Array WeakMap".split(" "),Wn="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Fn={};\r
+Fn[X]=Fn[H]=Fn[Q]=Fn[nn]=Fn[tn]=Fn[rn]=Fn[en]=Fn[un]=Fn[on]=true,Fn[z]=Fn[B]=Fn[J]=Fn[D]=Fn[M]=Fn[q]=Fn[K]=Fn["[object Map]"]=Fn[V]=Fn[Z]=Fn[Y]=Fn["[object Set]"]=Fn[G]=Fn["[object WeakMap]"]=false;var Ln={};Ln[z]=Ln[B]=Ln[J]=Ln[D]=Ln[M]=Ln[X]=Ln[H]=Ln[Q]=Ln[nn]=Ln[tn]=Ln[V]=Ln[Z]=Ln[Y]=Ln[G]=Ln[rn]=Ln[en]=Ln[un]=Ln[on]=true,Ln[q]=Ln[K]=Ln["[object Map]"]=Ln["[object Set]"]=Ln["[object WeakMap]"]=false;var Nn={"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a",\r
+"\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y",\r
+"\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss"},Tn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","`":"&#96;"},Pn={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'","&#96;":"`"},zn={"function":true,object:true},Bn={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Dn={"\\":"\\",\r
+"'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Mn=zn[typeof exports]&&exports&&!exports.nodeType&&exports,qn=zn[typeof module]&&module&&!module.nodeType&&module,Kn=zn[typeof self]&&self&&self.Object&&self,Vn=zn[typeof window]&&window&&window.Object&&window,Zn=qn&&qn.exports===Mn&&Mn,Yn=Mn&&qn&&typeof global=="object"&&global&&global.Object&&global||Vn!==(this&&this.window)&&Vn||Kn||this,Gn=function(){try{Object({toString:0}+"")}catch(n){return function(){return false}}return function(n){\r
+return typeof n.toString!="function"&&typeof(n+"")=="string"}}(),Jn=m();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Yn._=Jn, define(function(){return Jn})):Mn&&qn?Zn?(qn.exports=Jn)._=Jn:Mn._=Jn:Yn._=Jn}).call(this);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/marked.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/marked.js
new file mode 100644 (file)
index 0000000..76e8d99
--- /dev/null
@@ -0,0 +1,1272 @@
+/**\r
+ * marked - a markdown parser\r
+ * Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)\r
+ * https://github.com/chjj/marked\r
+ */\r
+\r
+;(function() {\r
+\r
+/**\r
+ * Block-Level Grammar\r
+ */\r
+\r
+var block = {\r
+  newline: /^\n+/,\r
+  code: /^( {4}[^\n]+\n*)+/,\r
+  fences: noop,\r
+  hr: /^( *[-*_]){3,} *(?:\n+|$)/,\r
+  heading: /^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,\r
+  nptable: noop,\r
+  lheading: /^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,\r
+  blockquote: /^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,\r
+  list: /^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,\r
+  html: /^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,\r
+  def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,\r
+  table: noop,\r
+  paragraph: /^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,\r
+  text: /^[^\n]+/\r
+};\r
+\r
+block.bullet = /(?:[*+-]|\d+\.)/;\r
+block.item = /^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/;\r
+block.item = replace(block.item, 'gm')\r
+  (/bull/g, block.bullet)\r
+  ();\r
+\r
+block.list = replace(block.list)\r
+  (/bull/g, block.bullet)\r
+  ('hr', '\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))')\r
+  ('def', '\\n+(?=' + block.def.source + ')')\r
+  ();\r
+\r
+block.blockquote = replace(block.blockquote)\r
+  ('def', block.def)\r
+  ();\r
+\r
+block._tag = '(?!(?:'\r
+  + 'a|em|strong|small|s|cite|q|dfn|abbr|data|time|code'\r
+  + '|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo'\r
+  + '|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b';\r
+\r
+block.html = replace(block.html)\r
+  ('comment', /<!--[\s\S]*?-->/)\r
+  ('closed', /<(tag)[\s\S]+?<\/\1>/)\r
+  ('closing', /<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)\r
+  (/tag/g, block._tag)\r
+  ();\r
+\r
+block.paragraph = replace(block.paragraph)\r
+  ('hr', block.hr)\r
+  ('heading', block.heading)\r
+  ('lheading', block.lheading)\r
+  ('blockquote', block.blockquote)\r
+  ('tag', '<' + block._tag)\r
+  ('def', block.def)\r
+  ();\r
+\r
+/**\r
+ * Normal Block Grammar\r
+ */\r
+\r
+block.normal = merge({}, block);\r
+\r
+/**\r
+ * GFM Block Grammar\r
+ */\r
+\r
+block.gfm = merge({}, block.normal, {\r
+  fences: /^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,\r
+  paragraph: /^/\r
+});\r
+\r
+block.gfm.paragraph = replace(block.paragraph)\r
+  ('(?!', '(?!'\r
+    + block.gfm.fences.source.replace('\\1', '\\2') + '|'\r
+    + block.list.source.replace('\\1', '\\3') + '|')\r
+  ();\r
+\r
+/**\r
+ * GFM + Tables Block Grammar\r
+ */\r
+\r
+block.tables = merge({}, block.gfm, {\r
+  nptable: /^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,\r
+  table: /^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/\r
+});\r
+\r
+/**\r
+ * Block Lexer\r
+ */\r
+\r
+function Lexer(options) {\r
+  this.tokens = [];\r
+  this.tokens.links = {};\r
+  this.options = options || marked.defaults;\r
+  this.rules = block.normal;\r
+\r
+  if (this.options.gfm) {\r
+    if (this.options.tables) {\r
+      this.rules = block.tables;\r
+    } else {\r
+      this.rules = block.gfm;\r
+    }\r
+  }\r
+}\r
+\r
+/**\r
+ * Expose Block Rules\r
+ */\r
+\r
+Lexer.rules = block;\r
+\r
+/**\r
+ * Static Lex Method\r
+ */\r
+\r
+Lexer.lex = function(src, options) {\r
+  var lexer = new Lexer(options);\r
+  return lexer.lex(src);\r
+};\r
+\r
+/**\r
+ * Preprocessing\r
+ */\r
+\r
+Lexer.prototype.lex = function(src) {\r
+  src = src\r
+    .replace(/\r\n|\r/g, '\n')\r
+    .replace(/\t/g, '    ')\r
+    .replace(/\u00a0/g, ' ')\r
+    .replace(/\u2424/g, '\n');\r
+\r
+  return this.token(src, true);\r
+};\r
+\r
+/**\r
+ * Lexing\r
+ */\r
+\r
+Lexer.prototype.token = function(src, top, bq) {\r
+  var src = src.replace(/^ +$/gm, '')\r
+    , next\r
+    , loose\r
+    , cap\r
+    , bull\r
+    , b\r
+    , item\r
+    , space\r
+    , i\r
+    , l;\r
+\r
+  while (src) {\r
+    // newline\r
+    if (cap = this.rules.newline.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      if (cap[0].length > 1) {\r
+        this.tokens.push({\r
+          type: 'space'\r
+        });\r
+      }\r
+    }\r
+\r
+    // code\r
+    if (cap = this.rules.code.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      cap = cap[0].replace(/^ {4}/gm, '');\r
+      this.tokens.push({\r
+        type: 'code',\r
+        text: !this.options.pedantic\r
+          ? cap.replace(/\n+$/, '')\r
+          : cap\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // fences (gfm)\r
+    if (cap = this.rules.fences.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'code',\r
+        lang: cap[2],\r
+        text: cap[3]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // heading\r
+    if (cap = this.rules.heading.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'heading',\r
+        depth: cap[1].length,\r
+        text: cap[2]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // table no leading pipe (gfm)\r
+    if (top && (cap = this.rules.nptable.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+\r
+      item = {\r
+        type: 'table',\r
+        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),\r
+        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),\r
+        cells: cap[3].replace(/\n$/, '').split('\n')\r
+      };\r
+\r
+      for (i = 0; i < item.align.length; i++) {\r
+        if (/^ *-+: *$/.test(item.align[i])) {\r
+          item.align[i] = 'right';\r
+        } else if (/^ *:-+: *$/.test(item.align[i])) {\r
+          item.align[i] = 'center';\r
+        } else if (/^ *:-+ *$/.test(item.align[i])) {\r
+          item.align[i] = 'left';\r
+        } else {\r
+          item.align[i] = null;\r
+        }\r
+      }\r
+\r
+      for (i = 0; i < item.cells.length; i++) {\r
+        item.cells[i] = item.cells[i].split(/ *\| */);\r
+      }\r
+\r
+      this.tokens.push(item);\r
+\r
+      continue;\r
+    }\r
+\r
+    // lheading\r
+    if (cap = this.rules.lheading.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'heading',\r
+        depth: cap[2] === '=' ? 1 : 2,\r
+        text: cap[1]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // hr\r
+    if (cap = this.rules.hr.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'hr'\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // blockquote\r
+    if (cap = this.rules.blockquote.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+\r
+      this.tokens.push({\r
+        type: 'blockquote_start'\r
+      });\r
+\r
+      cap = cap[0].replace(/^ *> ?/gm, '');\r
+\r
+      // Pass `top` to keep the current\r
+      // "toplevel" state. This is exactly\r
+      // how markdown.pl works.\r
+      this.token(cap, top, true);\r
+\r
+      this.tokens.push({\r
+        type: 'blockquote_end'\r
+      });\r
+\r
+      continue;\r
+    }\r
+\r
+    // list\r
+    if (cap = this.rules.list.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      bull = cap[2];\r
+\r
+      this.tokens.push({\r
+        type: 'list_start',\r
+        ordered: bull.length > 1\r
+      });\r
+\r
+      // Get each top-level item.\r
+      cap = cap[0].match(this.rules.item);\r
+\r
+      next = false;\r
+      l = cap.length;\r
+      i = 0;\r
+\r
+      for (; i < l; i++) {\r
+        item = cap[i];\r
+\r
+        // Remove the list item's bullet\r
+        // so it is seen as the next token.\r
+        space = item.length;\r
+        item = item.replace(/^ *([*+-]|\d+\.) +/, '');\r
+\r
+        // Outdent whatever the\r
+        // list item contains. Hacky.\r
+        if (~item.indexOf('\n ')) {\r
+          space -= item.length;\r
+          item = !this.options.pedantic\r
+            ? item.replace(new RegExp('^ {1,' + space + '}', 'gm'), '')\r
+            : item.replace(/^ {1,4}/gm, '');\r
+        }\r
+\r
+        // Determine whether the next list item belongs here.\r
+        // Backpedal if it does not belong in this list.\r
+        if (this.options.smartLists && i !== l - 1) {\r
+          b = block.bullet.exec(cap[i + 1])[0];\r
+          if (bull !== b && !(bull.length > 1 && b.length > 1)) {\r
+            src = cap.slice(i + 1).join('\n') + src;\r
+            i = l - 1;\r
+          }\r
+        }\r
+\r
+        // Determine whether item is loose or not.\r
+        // Use: /(^|\n)(?! )[^\n]+\n\n(?!\s*$)/\r
+        // for discount behavior.\r
+        loose = next || /\n\n(?!\s*$)/.test(item);\r
+        if (i !== l - 1) {\r
+          next = item.charAt(item.length - 1) === '\n';\r
+          if (!loose) loose = next;\r
+        }\r
+\r
+        this.tokens.push({\r
+          type: loose\r
+            ? 'loose_item_start'\r
+            : 'list_item_start'\r
+        });\r
+\r
+        // Recurse.\r
+        this.token(item, false, bq);\r
+\r
+        this.tokens.push({\r
+          type: 'list_item_end'\r
+        });\r
+      }\r
+\r
+      this.tokens.push({\r
+        type: 'list_end'\r
+      });\r
+\r
+      continue;\r
+    }\r
+\r
+    // html\r
+    if (cap = this.rules.html.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: this.options.sanitize\r
+          ? 'paragraph'\r
+          : 'html',\r
+        pre: cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style',\r
+        text: cap[0]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // def\r
+    if ((!bq && top) && (cap = this.rules.def.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.links[cap[1].toLowerCase()] = {\r
+        href: cap[2],\r
+        title: cap[3]\r
+      };\r
+      continue;\r
+    }\r
+\r
+    // table (gfm)\r
+    if (top && (cap = this.rules.table.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+\r
+      item = {\r
+        type: 'table',\r
+        header: cap[1].replace(/^ *| *\| *$/g, '').split(/ *\| */),\r
+        align: cap[2].replace(/^ *|\| *$/g, '').split(/ *\| */),\r
+        cells: cap[3].replace(/(?: *\| *)?\n$/, '').split('\n')\r
+      };\r
+\r
+      for (i = 0; i < item.align.length; i++) {\r
+        if (/^ *-+: *$/.test(item.align[i])) {\r
+          item.align[i] = 'right';\r
+        } else if (/^ *:-+: *$/.test(item.align[i])) {\r
+          item.align[i] = 'center';\r
+        } else if (/^ *:-+ *$/.test(item.align[i])) {\r
+          item.align[i] = 'left';\r
+        } else {\r
+          item.align[i] = null;\r
+        }\r
+      }\r
+\r
+      for (i = 0; i < item.cells.length; i++) {\r
+        item.cells[i] = item.cells[i]\r
+          .replace(/^ *\| *| *\| *$/g, '')\r
+          .split(/ *\| */);\r
+      }\r
+\r
+      this.tokens.push(item);\r
+\r
+      continue;\r
+    }\r
+\r
+    // top-level paragraph\r
+    if (top && (cap = this.rules.paragraph.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'paragraph',\r
+        text: cap[1].charAt(cap[1].length - 1) === '\n'\r
+          ? cap[1].slice(0, -1)\r
+          : cap[1]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    // text\r
+    if (cap = this.rules.text.exec(src)) {\r
+      // Top-level should never reach here.\r
+      src = src.substring(cap[0].length);\r
+      this.tokens.push({\r
+        type: 'text',\r
+        text: cap[0]\r
+      });\r
+      continue;\r
+    }\r
+\r
+    if (src) {\r
+      throw new\r
+        Error('Infinite loop on byte: ' + src.charCodeAt(0));\r
+    }\r
+  }\r
+\r
+  return this.tokens;\r
+};\r
+\r
+/**\r
+ * Inline-Level Grammar\r
+ */\r
+\r
+var inline = {\r
+  escape: /^\\([\\`*{}\[\]()#+\-.!_>])/,\r
+  autolink: /^<([^ >]+(@|:\/)[^ >]+)>/,\r
+  url: noop,\r
+  tag: /^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,\r
+  link: /^!?\[(inside)\]\(href\)/,\r
+  reflink: /^!?\[(inside)\]\s*\[([^\]]*)\]/,\r
+  nolink: /^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,\r
+  strong: /^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,\r
+  em: /^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,\r
+  code: /^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,\r
+  br: /^ {2,}\n(?!\s*$)/,\r
+  del: noop,\r
+  text: /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/\r
+};\r
+\r
+inline._inside = /(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/;\r
+inline._href = /\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/;\r
+\r
+inline.link = replace(inline.link)\r
+  ('inside', inline._inside)\r
+  ('href', inline._href)\r
+  ();\r
+\r
+inline.reflink = replace(inline.reflink)\r
+  ('inside', inline._inside)\r
+  ();\r
+\r
+/**\r
+ * Normal Inline Grammar\r
+ */\r
+\r
+inline.normal = merge({}, inline);\r
+\r
+/**\r
+ * Pedantic Inline Grammar\r
+ */\r
+\r
+inline.pedantic = merge({}, inline.normal, {\r
+  strong: /^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,\r
+  em: /^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/\r
+});\r
+\r
+/**\r
+ * GFM Inline Grammar\r
+ */\r
+\r
+inline.gfm = merge({}, inline.normal, {\r
+  escape: replace(inline.escape)('])', '~|])')(),\r
+  url: /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,\r
+  del: /^~~(?=\S)([\s\S]*?\S)~~/,\r
+  text: replace(inline.text)\r
+    (']|', '~]|')\r
+    ('|', '|https?://|')\r
+    ()\r
+});\r
+\r
+/**\r
+ * GFM + Line Breaks Inline Grammar\r
+ */\r
+\r
+inline.breaks = merge({}, inline.gfm, {\r
+  br: replace(inline.br)('{2,}', '*')(),\r
+  text: replace(inline.gfm.text)('{2,}', '*')()\r
+});\r
+\r
+/**\r
+ * Inline Lexer & Compiler\r
+ */\r
+\r
+function InlineLexer(links, options) {\r
+  this.options = options || marked.defaults;\r
+  this.links = links;\r
+  this.rules = inline.normal;\r
+  this.renderer = this.options.renderer || new Renderer;\r
+  this.renderer.options = this.options;\r
+\r
+  if (!this.links) {\r
+    throw new\r
+      Error('Tokens array requires a `links` property.');\r
+  }\r
+\r
+  if (this.options.gfm) {\r
+    if (this.options.breaks) {\r
+      this.rules = inline.breaks;\r
+    } else {\r
+      this.rules = inline.gfm;\r
+    }\r
+  } else if (this.options.pedantic) {\r
+    this.rules = inline.pedantic;\r
+  }\r
+}\r
+\r
+/**\r
+ * Expose Inline Rules\r
+ */\r
+\r
+InlineLexer.rules = inline;\r
+\r
+/**\r
+ * Static Lexing/Compiling Method\r
+ */\r
+\r
+InlineLexer.output = function(src, links, options) {\r
+  var inline = new InlineLexer(links, options);\r
+  return inline.output(src);\r
+};\r
+\r
+/**\r
+ * Lexing/Compiling\r
+ */\r
+\r
+InlineLexer.prototype.output = function(src) {\r
+  var out = ''\r
+    , link\r
+    , text\r
+    , href\r
+    , cap;\r
+\r
+  while (src) {\r
+    // escape\r
+    if (cap = this.rules.escape.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += cap[1];\r
+      continue;\r
+    }\r
+\r
+    // autolink\r
+    if (cap = this.rules.autolink.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      if (cap[2] === '@') {\r
+        text = cap[1].charAt(6) === ':'\r
+          ? this.mangle(cap[1].substring(7))\r
+          : this.mangle(cap[1]);\r
+        href = this.mangle('mailto:') + text;\r
+      } else {\r
+        text = escape(cap[1]);\r
+        href = text;\r
+      }\r
+      out += this.renderer.link(href, null, text);\r
+      continue;\r
+    }\r
+\r
+    // url (gfm)\r
+    if (!this.inLink && (cap = this.rules.url.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+      text = escape(cap[1]);\r
+      href = text;\r
+      out += this.renderer.link(href, null, text);\r
+      continue;\r
+    }\r
+\r
+    // tag\r
+    if (cap = this.rules.tag.exec(src)) {\r
+      if (!this.inLink && /^<a /i.test(cap[0])) {\r
+        this.inLink = true;\r
+      } else if (this.inLink && /^<\/a>/i.test(cap[0])) {\r
+        this.inLink = false;\r
+      }\r
+      src = src.substring(cap[0].length);\r
+      out += this.options.sanitize\r
+        ? escape(cap[0])\r
+        : cap[0];\r
+      continue;\r
+    }\r
+\r
+    // link\r
+    if (cap = this.rules.link.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      this.inLink = true;\r
+      out += this.outputLink(cap, {\r
+        href: cap[2],\r
+        title: cap[3]\r
+      });\r
+      this.inLink = false;\r
+      continue;\r
+    }\r
+\r
+    // reflink, nolink\r
+    if ((cap = this.rules.reflink.exec(src))\r
+        || (cap = this.rules.nolink.exec(src))) {\r
+      src = src.substring(cap[0].length);\r
+      link = (cap[2] || cap[1]).replace(/\s+/g, ' ');\r
+      link = this.links[link.toLowerCase()];\r
+      if (!link || !link.href) {\r
+        out += cap[0].charAt(0);\r
+        src = cap[0].substring(1) + src;\r
+        continue;\r
+      }\r
+      this.inLink = true;\r
+      out += this.outputLink(cap, link);\r
+      this.inLink = false;\r
+      continue;\r
+    }\r
+\r
+    // strong\r
+    if (cap = this.rules.strong.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += this.renderer.strong(this.output(cap[2] || cap[1]));\r
+      continue;\r
+    }\r
+\r
+    // em\r
+    if (cap = this.rules.em.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += this.renderer.em(this.output(cap[2] || cap[1]));\r
+      continue;\r
+    }\r
+\r
+    // code\r
+    if (cap = this.rules.code.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += this.renderer.codespan(escape(cap[2], true));\r
+      continue;\r
+    }\r
+\r
+    // br\r
+    if (cap = this.rules.br.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += this.renderer.br();\r
+      continue;\r
+    }\r
+\r
+    // del (gfm)\r
+    if (cap = this.rules.del.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += this.renderer.del(this.output(cap[1]));\r
+      continue;\r
+    }\r
+\r
+    // text\r
+    if (cap = this.rules.text.exec(src)) {\r
+      src = src.substring(cap[0].length);\r
+      out += escape(this.smartypants(cap[0]));\r
+      continue;\r
+    }\r
+\r
+    if (src) {\r
+      throw new\r
+        Error('Infinite loop on byte: ' + src.charCodeAt(0));\r
+    }\r
+  }\r
+\r
+  return out;\r
+};\r
+\r
+/**\r
+ * Compile Link\r
+ */\r
+\r
+InlineLexer.prototype.outputLink = function(cap, link) {\r
+  var href = escape(link.href)\r
+    , title = link.title ? escape(link.title) : null;\r
+\r
+  return cap[0].charAt(0) !== '!'\r
+    ? this.renderer.link(href, title, this.output(cap[1]))\r
+    : this.renderer.image(href, title, escape(cap[1]));\r
+};\r
+\r
+/**\r
+ * Smartypants Transformations\r
+ */\r
+\r
+InlineLexer.prototype.smartypants = function(text) {\r
+  if (!this.options.smartypants) return text;\r
+  return text\r
+    // em-dashes\r
+    .replace(/--/g, '\u2014')\r
+    // opening singles\r
+    .replace(/(^|[-\u2014/(\[{"\s])'/g, '$1\u2018')\r
+    // closing singles & apostrophes\r
+    .replace(/'/g, '\u2019')\r
+    // opening doubles\r
+    .replace(/(^|[-\u2014/(\[{\u2018\s])"/g, '$1\u201c')\r
+    // closing doubles\r
+    .replace(/"/g, '\u201d')\r
+    // ellipses\r
+    .replace(/\.{3}/g, '\u2026');\r
+};\r
+\r
+/**\r
+ * Mangle Links\r
+ */\r
+\r
+InlineLexer.prototype.mangle = function(text) {\r
+  var out = ''\r
+    , l = text.length\r
+    , i = 0\r
+    , ch;\r
+\r
+  for (; i < l; i++) {\r
+    ch = text.charCodeAt(i);\r
+    if (Math.random() > 0.5) {\r
+      ch = 'x' + ch.toString(16);\r
+    }\r
+    out += '&#' + ch + ';';\r
+  }\r
+\r
+  return out;\r
+};\r
+\r
+/**\r
+ * Renderer\r
+ */\r
+\r
+function Renderer(options) {\r
+  this.options = options || {};\r
+}\r
+\r
+Renderer.prototype.code = function(code, lang, escaped) {\r
+  if (this.options.highlight) {\r
+    var out = this.options.highlight(code, lang);\r
+    if (out != null && out !== code) {\r
+      escaped = true;\r
+      code = out;\r
+    }\r
+  }\r
+\r
+  if (!lang) {\r
+    return '<pre><code>'\r
+      + (escaped ? code : escape(code, true))\r
+      + '\n</code></pre>';\r
+  }\r
+\r
+  return '<pre><code class="'\r
+    + this.options.langPrefix\r
+    + escape(lang, true)\r
+    + '">'\r
+    + (escaped ? code : escape(code, true))\r
+    + '\n</code></pre>\n';\r
+};\r
+\r
+Renderer.prototype.blockquote = function(quote) {\r
+  return '<blockquote>\n' + quote + '</blockquote>\n';\r
+};\r
+\r
+Renderer.prototype.html = function(html) {\r
+  return html;\r
+};\r
+\r
+Renderer.prototype.heading = function(text, level, raw) {\r
+  return '<h'\r
+    + level\r
+    + ' id="'\r
+    + this.options.headerPrefix\r
+    + raw.toLowerCase().replace(/[^\w]+/g, '-')\r
+    + '">'\r
+    + text\r
+    + '</h'\r
+    + level\r
+    + '>\n';\r
+};\r
+\r
+Renderer.prototype.hr = function() {\r
+  return this.options.xhtml ? '<hr/>\n' : '<hr>\n';\r
+};\r
+\r
+Renderer.prototype.list = function(body, ordered) {\r
+  var type = ordered ? 'ol' : 'ul';\r
+  return '<' + type + '>\n' + body + '</' + type + '>\n';\r
+};\r
+\r
+Renderer.prototype.listitem = function(text) {\r
+  return '<li>' + text + '</li>\n';\r
+};\r
+\r
+Renderer.prototype.paragraph = function(text) {\r
+  return '<p>' + text + '</p>\n';\r
+};\r
+\r
+Renderer.prototype.table = function(header, body) {\r
+  return '<table>\n'\r
+    + '<thead>\n'\r
+    + header\r
+    + '</thead>\n'\r
+    + '<tbody>\n'\r
+    + body\r
+    + '</tbody>\n'\r
+    + '</table>\n';\r
+};\r
+\r
+Renderer.prototype.tablerow = function(content) {\r
+  return '<tr>\n' + content + '</tr>\n';\r
+};\r
+\r
+Renderer.prototype.tablecell = function(content, flags) {\r
+  var type = flags.header ? 'th' : 'td';\r
+  var tag = flags.align\r
+    ? '<' + type + ' style="text-align:' + flags.align + '">'\r
+    : '<' + type + '>';\r
+  return tag + content + '</' + type + '>\n';\r
+};\r
+\r
+// span level renderer\r
+Renderer.prototype.strong = function(text) {\r
+  return '<strong>' + text + '</strong>';\r
+};\r
+\r
+Renderer.prototype.em = function(text) {\r
+  return '<em>' + text + '</em>';\r
+};\r
+\r
+Renderer.prototype.codespan = function(text) {\r
+  return '<code>' + text + '</code>';\r
+};\r
+\r
+Renderer.prototype.br = function() {\r
+  return this.options.xhtml ? '<br/>' : '<br>';\r
+};\r
+\r
+Renderer.prototype.del = function(text) {\r
+  return '<del>' + text + '</del>';\r
+};\r
+\r
+Renderer.prototype.link = function(href, title, text) {\r
+  if (this.options.sanitize) {\r
+    try {\r
+      var prot = decodeURIComponent(unescape(href))\r
+        .replace(/[^\w:]/g, '')\r
+        .toLowerCase();\r
+    } catch (e) {\r
+      return '';\r
+    }\r
+    if (prot.indexOf('javascript:') === 0) {\r
+      return '';\r
+    }\r
+  }\r
+  var out = '<a href="' + href + '"';\r
+  if (title) {\r
+    out += ' title="' + title + '"';\r
+  }\r
+  out += '>' + text + '</a>';\r
+  return out;\r
+};\r
+\r
+Renderer.prototype.image = function(href, title, text) {\r
+  var out = '<img src="' + href + '" alt="' + text + '"';\r
+  if (title) {\r
+    out += ' title="' + title + '"';\r
+  }\r
+  out += this.options.xhtml ? '/>' : '>';\r
+  return out;\r
+};\r
+\r
+/**\r
+ * Parsing & Compiling\r
+ */\r
+\r
+function Parser(options) {\r
+  this.tokens = [];\r
+  this.token = null;\r
+  this.options = options || marked.defaults;\r
+  this.options.renderer = this.options.renderer || new Renderer;\r
+  this.renderer = this.options.renderer;\r
+  this.renderer.options = this.options;\r
+}\r
+\r
+/**\r
+ * Static Parse Method\r
+ */\r
+\r
+Parser.parse = function(src, options, renderer) {\r
+  var parser = new Parser(options, renderer);\r
+  return parser.parse(src);\r
+};\r
+\r
+/**\r
+ * Parse Loop\r
+ */\r
+\r
+Parser.prototype.parse = function(src) {\r
+  this.inline = new InlineLexer(src.links, this.options, this.renderer);\r
+  this.tokens = src.reverse();\r
+\r
+  var out = '';\r
+  while (this.next()) {\r
+    out += this.tok();\r
+  }\r
+\r
+  return out;\r
+};\r
+\r
+/**\r
+ * Next Token\r
+ */\r
+\r
+Parser.prototype.next = function() {\r
+  return this.token = this.tokens.pop();\r
+};\r
+\r
+/**\r
+ * Preview Next Token\r
+ */\r
+\r
+Parser.prototype.peek = function() {\r
+  return this.tokens[this.tokens.length - 1] || 0;\r
+};\r
+\r
+/**\r
+ * Parse Text Tokens\r
+ */\r
+\r
+Parser.prototype.parseText = function() {\r
+  var body = this.token.text;\r
+\r
+  while (this.peek().type === 'text') {\r
+    body += '\n' + this.next().text;\r
+  }\r
+\r
+  return this.inline.output(body);\r
+};\r
+\r
+/**\r
+ * Parse Current Token\r
+ */\r
+\r
+Parser.prototype.tok = function() {\r
+  switch (this.token.type) {\r
+    case 'space': {\r
+      return '';\r
+    }\r
+    case 'hr': {\r
+      return this.renderer.hr();\r
+    }\r
+    case 'heading': {\r
+      return this.renderer.heading(\r
+        this.inline.output(this.token.text),\r
+        this.token.depth,\r
+        this.token.text);\r
+    }\r
+    case 'code': {\r
+      return this.renderer.code(this.token.text,\r
+        this.token.lang,\r
+        this.token.escaped);\r
+    }\r
+    case 'table': {\r
+      var header = ''\r
+        , body = ''\r
+        , i\r
+        , row\r
+        , cell\r
+        , flags\r
+        , j;\r
+\r
+      // header\r
+      cell = '';\r
+      for (i = 0; i < this.token.header.length; i++) {\r
+        flags = { header: true, align: this.token.align[i] };\r
+        cell += this.renderer.tablecell(\r
+          this.inline.output(this.token.header[i]),\r
+          { header: true, align: this.token.align[i] }\r
+        );\r
+      }\r
+      header += this.renderer.tablerow(cell);\r
+\r
+      for (i = 0; i < this.token.cells.length; i++) {\r
+        row = this.token.cells[i];\r
+\r
+        cell = '';\r
+        for (j = 0; j < row.length; j++) {\r
+          cell += this.renderer.tablecell(\r
+            this.inline.output(row[j]),\r
+            { header: false, align: this.token.align[j] }\r
+          );\r
+        }\r
+\r
+        body += this.renderer.tablerow(cell);\r
+      }\r
+      return this.renderer.table(header, body);\r
+    }\r
+    case 'blockquote_start': {\r
+      var body = '';\r
+\r
+      while (this.next().type !== 'blockquote_end') {\r
+        body += this.tok();\r
+      }\r
+\r
+      return this.renderer.blockquote(body);\r
+    }\r
+    case 'list_start': {\r
+      var body = ''\r
+        , ordered = this.token.ordered;\r
+\r
+      while (this.next().type !== 'list_end') {\r
+        body += this.tok();\r
+      }\r
+\r
+      return this.renderer.list(body, ordered);\r
+    }\r
+    case 'list_item_start': {\r
+      var body = '';\r
+\r
+      while (this.next().type !== 'list_item_end') {\r
+        body += this.token.type === 'text'\r
+          ? this.parseText()\r
+          : this.tok();\r
+      }\r
+\r
+      return this.renderer.listitem(body);\r
+    }\r
+    case 'loose_item_start': {\r
+      var body = '';\r
+\r
+      while (this.next().type !== 'list_item_end') {\r
+        body += this.tok();\r
+      }\r
+\r
+      return this.renderer.listitem(body);\r
+    }\r
+    case 'html': {\r
+      var html = !this.token.pre && !this.options.pedantic\r
+        ? this.inline.output(this.token.text)\r
+        : this.token.text;\r
+      return this.renderer.html(html);\r
+    }\r
+    case 'paragraph': {\r
+      return this.renderer.paragraph(this.inline.output(this.token.text));\r
+    }\r
+    case 'text': {\r
+      return this.renderer.paragraph(this.parseText());\r
+    }\r
+  }\r
+};\r
+\r
+/**\r
+ * Helpers\r
+ */\r
+\r
+function escape(html, encode) {\r
+  return html\r
+    .replace(!encode ? /&(?!#?\w+;)/g : /&/g, '&amp;')\r
+    .replace(/</g, '&lt;')\r
+    .replace(/>/g, '&gt;')\r
+    .replace(/"/g, '&quot;')\r
+    .replace(/'/g, '&#39;');\r
+}\r
+\r
+function unescape(html) {\r
+  return html.replace(/&([#\w]+);/g, function(_, n) {\r
+    n = n.toLowerCase();\r
+    if (n === 'colon') return ':';\r
+    if (n.charAt(0) === '#') {\r
+      return n.charAt(1) === 'x'\r
+        ? String.fromCharCode(parseInt(n.substring(2), 16))\r
+        : String.fromCharCode(+n.substring(1));\r
+    }\r
+    return '';\r
+  });\r
+}\r
+\r
+function replace(regex, opt) {\r
+  regex = regex.source;\r
+  opt = opt || '';\r
+  return function self(name, val) {\r
+    if (!name) return new RegExp(regex, opt);\r
+    val = val.source || val;\r
+    val = val.replace(/(^|[^\[])\^/g, '$1');\r
+    regex = regex.replace(name, val);\r
+    return self;\r
+  };\r
+}\r
+\r
+function noop() {}\r
+noop.exec = noop;\r
+\r
+function merge(obj) {\r
+  var i = 1\r
+    , target\r
+    , key;\r
+\r
+  for (; i < arguments.length; i++) {\r
+    target = arguments[i];\r
+    for (key in target) {\r
+      if (Object.prototype.hasOwnProperty.call(target, key)) {\r
+        obj[key] = target[key];\r
+      }\r
+    }\r
+  }\r
+\r
+  return obj;\r
+}\r
+\r
+\r
+/**\r
+ * Marked\r
+ */\r
+\r
+function marked(src, opt, callback) {\r
+  if (callback || typeof opt === 'function') {\r
+    if (!callback) {\r
+      callback = opt;\r
+      opt = null;\r
+    }\r
+\r
+    opt = merge({}, marked.defaults, opt || {});\r
+\r
+    var highlight = opt.highlight\r
+      , tokens\r
+      , pending\r
+      , i = 0;\r
+\r
+    try {\r
+      tokens = Lexer.lex(src, opt)\r
+    } catch (e) {\r
+      return callback(e);\r
+    }\r
+\r
+    pending = tokens.length;\r
+\r
+    var done = function(err) {\r
+      if (err) {\r
+        opt.highlight = highlight;\r
+        return callback(err);\r
+      }\r
+\r
+      var out;\r
+\r
+      try {\r
+        out = Parser.parse(tokens, opt);\r
+      } catch (e) {\r
+        err = e;\r
+      }\r
+\r
+      opt.highlight = highlight;\r
+\r
+      return err\r
+        ? callback(err)\r
+        : callback(null, out);\r
+    };\r
+\r
+    if (!highlight || highlight.length < 3) {\r
+      return done();\r
+    }\r
+\r
+    delete opt.highlight;\r
+\r
+    if (!pending) return done();\r
+\r
+    for (; i < tokens.length; i++) {\r
+      (function(token) {\r
+        if (token.type !== 'code') {\r
+          return --pending || done();\r
+        }\r
+        return highlight(token.text, token.lang, function(err, code) {\r
+          if (err) return done(err);\r
+          if (code == null || code === token.text) {\r
+            return --pending || done();\r
+          }\r
+          token.text = code;\r
+          token.escaped = true;\r
+          --pending || done();\r
+        });\r
+      })(tokens[i]);\r
+    }\r
+\r
+    return;\r
+  }\r
+  try {\r
+    if (opt) opt = merge({}, marked.defaults, opt);\r
+    return Parser.parse(Lexer.lex(src, opt), opt);\r
+  } catch (e) {\r
+    e.message += '\nPlease report this to https://github.com/chjj/marked.';\r
+    if ((opt || marked.defaults).silent) {\r
+      return '<p>An error occured:</p><pre>'\r
+        + escape(e.message + '', true)\r
+        + '</pre>';\r
+    }\r
+    throw e;\r
+  }\r
+}\r
+\r
+/**\r
+ * Options\r
+ */\r
+\r
+marked.options =\r
+marked.setOptions = function(opt) {\r
+  merge(marked.defaults, opt);\r
+  return marked;\r
+};\r
+\r
+marked.defaults = {\r
+  gfm: true,\r
+  tables: true,\r
+  breaks: false,\r
+  pedantic: false,\r
+  sanitize: false,\r
+  smartLists: false,\r
+  silent: false,\r
+  highlight: null,\r
+  langPrefix: 'lang-',\r
+  smartypants: false,\r
+  headerPrefix: '',\r
+  renderer: new Renderer,\r
+  xhtml: false\r
+};\r
+\r
+/**\r
+ * Expose\r
+ */\r
+\r
+marked.Parser = Parser;\r
+marked.parser = Parser.parse;\r
+\r
+marked.Renderer = Renderer;\r
+\r
+marked.Lexer = Lexer;\r
+marked.lexer = Lexer.lex;\r
+\r
+marked.InlineLexer = InlineLexer;\r
+marked.inlineLexer = InlineLexer.output;\r
+\r
+marked.parse = marked;\r
+\r
+if (typeof module !== 'undefined' && typeof exports === 'object') {\r
+  module.exports = marked;\r
+} else if (typeof define === 'function' && define.amd) {\r
+  define(function() { return marked; });\r
+} else {\r
+  this.marked = marked;\r
+}\r
+\r
+}).call(function() {\r
+  return this || (typeof window !== 'undefined' ? window : global);\r
+}());
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/swagger-oauth.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/swagger-oauth.js
new file mode 100644 (file)
index 0000000..c86454b
--- /dev/null
@@ -0,0 +1,339 @@
+var appName;\r
+var popupMask;\r
+var popupDialog;\r
+var clientId;\r
+var realm;\r
+var redirect_uri;\r
+var clientSecret;\r
+var scopeSeparator;\r
+var additionalQueryStringParams;\r
+\r
+function handleLogin() {\r
+  var scopes = [];\r
+\r
+  var auths = window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions;\r
+  if(auths) {\r
+    var key;\r
+    var defs = auths;\r
+    for(key in defs) {\r
+      var auth = defs[key];\r
+      if(auth.type === 'oauth2' && auth.scopes) {\r
+        var scope;\r
+        if(Array.isArray(auth.scopes)) {\r
+          // 1.2 support\r
+          var i;\r
+          for(i = 0; i < auth.scopes.length; i++) {\r
+            scopes.push(auth.scopes[i]);\r
+          }\r
+        }\r
+        else {\r
+          // 2.0 support\r
+          for(scope in auth.scopes) {\r
+            scopes.push({scope: scope, description: auth.scopes[scope], OAuthSchemeKey: key});\r
+          }\r
+        }\r
+      }\r
+    }\r
+  }\r
+\r
+  if(window.swaggerUi.api\r
+    && window.swaggerUi.api.info) {\r
+    appName = window.swaggerUi.api.info.title;\r
+  }\r
+\r
+  $('.api-popup-dialog').remove(); \r
+  popupDialog = $(\r
+    [\r
+      '<div class="api-popup-dialog">',\r
+      '<div class="api-popup-title">Select OAuth2.0 Scopes</div>',\r
+      '<div class="api-popup-content">',\r
+        '<p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.',\r
+          '<a href="#">Learn how to use</a>',\r
+        '</p>',\r
+        '<p><strong>' + appName + '</strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>',\r
+        '<ul class="api-popup-scopes">',\r
+        '</ul>',\r
+        '<p class="error-msg"></p>',\r
+        '<div class="api-popup-actions"><button class="api-popup-authbtn api-button green" type="button">Authorize</button><button class="api-popup-cancel api-button gray" type="button">Cancel</button></div>',\r
+      '</div>',\r
+      '</div>'].join(''));\r
+  $(document.body).append(popupDialog);\r
+\r
+  //TODO: only display applicable scopes (will need to pass them into handleLogin)\r
+  popup = popupDialog.find('ul.api-popup-scopes').empty();\r
+  for (i = 0; i < scopes.length; i ++) {\r
+    scope = scopes[i];\r
+    str = '<li><input type="checkbox" id="scope_' + i + '" scope="' + scope.scope + '"' +'" oauthtype="' + scope.OAuthSchemeKey +'"/>' + '<label for="scope_' + i + '">' + scope.scope ;\r
+    if (scope.description) {\r
+      if ($.map(auths, function(n, i) { return i; }).length > 1) //if we have more than one scheme, display schemes\r
+           str += '<br/><span class="api-scope-desc">' + scope.description + ' ('+ scope.OAuthSchemeKey+')' +'</span>';\r
+         else\r
+           str += '<br/><span class="api-scope-desc">' + scope.description + '</span>';\r
+    }\r
+    str += '</label></li>';\r
+    popup.append(str);\r
+  }\r
+\r
+  var $win = $(window),\r
+    dw = $win.width(),\r
+    dh = $win.height(),\r
+    st = $win.scrollTop(),\r
+    dlgWd = popupDialog.outerWidth(),\r
+    dlgHt = popupDialog.outerHeight(),\r
+    top = (dh -dlgHt)/2 + st,\r
+    left = (dw - dlgWd)/2;\r
+\r
+  popupDialog.css({\r
+    top: (top < 0? 0 : top) + 'px',\r
+    left: (left < 0? 0 : left) + 'px'\r
+  });\r
+\r
+  popupDialog.find('button.api-popup-cancel').click(function() {\r
+    popupMask.hide();\r
+    popupDialog.hide();\r
+    popupDialog.empty();\r
+    popupDialog = [];\r
+  });\r
+\r
+  $('button.api-popup-authbtn').unbind();\r
+  popupDialog.find('button.api-popup-authbtn').click(function() {\r
+    popupMask.hide();\r
+    popupDialog.hide();\r
+\r
+    var authSchemes = window.swaggerUi.api.authSchemes;\r
+    var host = window.location;\r
+    var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));\r
+    var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';\r
+    var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;\r
+    var url = null;\r
+    var scopes = []\r
+    var o = popup.find('input:checked'); \r
+    var OAuthSchemeKeys = [];\r
+    var state;\r
+    for(k =0; k < o.length; k++) {\r
+      var scope = $(o[k]).attr('scope');\r
+      if (scopes.indexOf(scope) === -1)\r
+        scopes.push(scope);\r
+      var OAuthSchemeKey = $(o[k]).attr('oauthtype');      \r
+      if (OAuthSchemeKeys.indexOf(OAuthSchemeKey) === -1)\r
+          OAuthSchemeKeys.push(OAuthSchemeKey);\r
+    }\r
+    \r
+    //TODO: merge not replace if scheme is different from any existing \r
+    //(needs to be aware of schemes to do so correctly)\r
+    window.enabledScopes=scopes;    \r
+    \r
+    for (var key in authSchemes) { \r
+      if (authSchemes.hasOwnProperty(key) && OAuthSchemeKeys.indexOf(key) != -1) { //only look at keys that match this scope.\r
+        var flow = authSchemes[key].flow;\r
+\r
+        if(authSchemes[key].type === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {\r
+          var dets = authSchemes[key];\r
+          url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');\r
+          window.swaggerUi.tokenName = dets.tokenName || 'access_token';\r
+          window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);\r
+          state = key;\r
+        }\r
+        else if(authSchemes[key].type === 'oauth2' && flow && (flow === 'application')) {\r
+            var dets = authSchemes[key];\r
+            window.swaggerUi.tokenName = dets.tokenName || 'access_token';\r
+            clientCredentialsFlow(scopes, dets.tokenUrl, key);\r
+            return;\r
+        }        \r
+        else if(authSchemes[key].grantTypes) {\r
+          // 1.2 support\r
+          var o = authSchemes[key].grantTypes;\r
+          for(var t in o) {\r
+            if(o.hasOwnProperty(t) && t === 'implicit') {\r
+              var dets = o[t];\r
+              var ep = dets.loginEndpoint.url;\r
+              url = dets.loginEndpoint.url + '?response_type=token';\r
+              window.swaggerUi.tokenName = dets.tokenName;\r
+            }\r
+            else if (o.hasOwnProperty(t) && t === 'accessCode') {\r
+              var dets = o[t];\r
+              var ep = dets.tokenRequestEndpoint.url;\r
+              url = dets.tokenRequestEndpoint.url + '?response_type=code';\r
+              window.swaggerUi.tokenName = dets.tokenName;\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+\r
+    redirect_uri = redirectUrl;\r
+\r
+    url += '&redirect_uri=' + encodeURIComponent(redirectUrl);\r
+    url += '&realm=' + encodeURIComponent(realm);\r
+    url += '&client_id=' + encodeURIComponent(clientId);\r
+    url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator));\r
+    url += '&state=' + encodeURIComponent(state);\r
+    for (var key in additionalQueryStringParams) {\r
+        url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]);\r
+    }\r
+\r
+    window.open(url);\r
+  });\r
+\r
+  popupMask.show();\r
+  popupDialog.show();\r
+  return;\r
+}\r
+\r
+\r
+function handleLogout() {\r
+  for(key in window.swaggerUi.api.clientAuthorizations.authz){\r
+    window.swaggerUi.api.clientAuthorizations.remove(key)\r
+  }\r
+  window.enabledScopes = null;\r
+  $('.api-ic.ic-on').addClass('ic-off');\r
+  $('.api-ic.ic-on').removeClass('ic-on');\r
+\r
+  // set the info box\r
+  $('.api-ic.ic-warning').addClass('ic-error');\r
+  $('.api-ic.ic-warning').removeClass('ic-warning');\r
+}\r
+\r
+function initOAuth(opts) {\r
+  var o = (opts||{});\r
+  var errors = [];\r
+\r
+  appName = (o.appName||errors.push('missing appName'));\r
+  popupMask = (o.popupMask||$('#api-common-mask'));\r
+  popupDialog = (o.popupDialog||$('.api-popup-dialog'));\r
+  clientId = (o.clientId||errors.push('missing client id'));\r
+  clientSecret = (o.clientSecret||null);\r
+  realm = (o.realm||errors.push('missing realm'));\r
+  scopeSeparator = (o.scopeSeparator||' ');\r
+  additionalQueryStringParams = (o.additionalQueryStringParams||{});\r
+\r
+  if(errors.length > 0){\r
+    log('auth unable initialize oauth: ' + errors);\r
+    return;\r
+  }\r
+\r
+  $('pre code').each(function(i, e) {hljs.highlightBlock(e)});\r
+  $('.api-ic').unbind();\r
+  $('.api-ic').click(function(s) {\r
+    if($(s.target).hasClass('ic-off'))\r
+      handleLogin();\r
+    else {\r
+      handleLogout();\r
+    }\r
+    false;\r
+  });\r
+}\r
+\r
+function clientCredentialsFlow(scopes, tokenUrl, OAuthSchemeKey) {\r
+    var params = {\r
+      'client_id': clientId,\r
+      'client_secret': clientSecret,\r
+      'scope': scopes.join(' '),\r
+      'grant_type': 'client_credentials'\r
+    }\r
+    $.ajax(\r
+    {\r
+      url : tokenUrl,\r
+      type: "POST",\r
+      data: params,\r
+      success:function(data, textStatus, jqXHR)\r
+      {\r
+        onOAuthComplete(data,OAuthSchemeKey);\r
+      },\r
+      error: function(jqXHR, textStatus, errorThrown)\r
+      {\r
+        onOAuthComplete("");\r
+      }\r
+    });\r
+    \r
+  }\r
+\r
+window.processOAuthCode = function processOAuthCode(data) {\r
+  var OAuthSchemeKey = data.state;\r
+  var params = {\r
+    'client_id': clientId,\r
+    'code': data.code,\r
+    'grant_type': 'authorization_code',\r
+    'redirect_uri': redirect_uri\r
+  };\r
+\r
+  if (clientSecret) {\r
+    params.client_secret = clientSecret;\r
+  }\r
+\r
+  $.ajax(\r
+  {\r
+    url : window.swaggerUi.tokenUrl,\r
+    type: "POST",\r
+    data: params,\r
+    success:function(data, textStatus, jqXHR)\r
+    {\r
+      onOAuthComplete(data, OAuthSchemeKey);\r
+    },\r
+    error: function(jqXHR, textStatus, errorThrown)\r
+    {\r
+      onOAuthComplete("");\r
+    }\r
+  });\r
+};\r
+\r
+window.onOAuthComplete = function onOAuthComplete(token,OAuthSchemeKey) {\r
+  if(token) {\r
+    if(token.error) {\r
+      var checkbox = $('input[type=checkbox],.secured')\r
+      checkbox.each(function(pos){\r
+        checkbox[pos].checked = false;\r
+      });\r
+      alert(token.error);\r
+    }\r
+    else {\r
+      var b = token[window.swaggerUi.tokenName];      \r
+      if (!OAuthSchemeKey){\r
+          OAuthSchemeKey = token.state;\r
+      }\r
+      if(b){\r
+        // if all roles are satisfied\r
+        var o = null;\r
+        $.each($('.auth .api-ic .api_information_panel'), function(k, v) { \r
+          var children = v;\r
+          if(children && children.childNodes) {\r
+            var requiredScopes = [];\r
+            $.each((children.childNodes), function (k1, v1){\r
+              var inner = v1.innerHTML;\r
+              if(inner)\r
+                requiredScopes.push(inner);\r
+            });\r
+            var diff = [];\r
+            for(var i=0; i < requiredScopes.length; i++) {\r
+              var s = requiredScopes[i];\r
+              if(window.enabledScopes && window.enabledScopes.indexOf(s) == -1) {\r
+                diff.push(s);\r
+              }\r
+            }\r
+            if(diff.length > 0){\r
+              o = v.parentNode.parentNode;\r
+              $(o.parentNode).find('.api-ic.ic-on').addClass('ic-off');\r
+              $(o.parentNode).find('.api-ic.ic-on').removeClass('ic-on');\r
+\r
+              // sorry, not all scopes are satisfied\r
+              $(o).find('.api-ic').addClass('ic-warning');\r
+              $(o).find('.api-ic').removeClass('ic-error');\r
+            }\r
+            else {\r
+              o = v.parentNode.parentNode;\r
+              $(o.parentNode).find('.api-ic.ic-off').addClass('ic-on');\r
+              $(o.parentNode).find('.api-ic.ic-off').removeClass('ic-off');\r
+\r
+              // all scopes are satisfied\r
+              $(o).find('.api-ic').addClass('ic-info');\r
+              $(o).find('.api-ic').removeClass('ic-warning');\r
+              $(o).find('.api-ic').removeClass('ic-error');\r
+            }\r
+          }\r
+        });\r
+        window.swaggerUi.api.clientAuthorizations.add(window.OAuthSchemeKey, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));\r
+        window.swaggerUi.load();\r
+      }\r
+    }\r
+  }\r
+};\r
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/o2c.html b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/o2c.html
new file mode 100644 (file)
index 0000000..064fdd3
--- /dev/null
@@ -0,0 +1,20 @@
+<script>\r
+var qp = null;\r
+if(window.location.hash) {\r
+  qp = location.hash.substring(1);\r
+}\r
+else {\r
+  qp = location.search.substring(1);\r
+}\r
+qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',\r
+  function(key, value) {\r
+    return key===""?value:decodeURIComponent(value) }\r
+  ):{}\r
+\r
+if (window.opener.swaggerUi.tokenUrl)\r
+    window.opener.processOAuthCode(qp);\r
+else\r
+    window.opener.onOAuthComplete(qp);\r
+\r
+window.close();\r
+</script>
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.js
new file mode 100644 (file)
index 0000000..19a635a
--- /dev/null
@@ -0,0 +1,22284 @@
+/**\r
+ * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API\r
+ * @version v2.1.4\r
+ * @link http://swagger.io\r
+ * @license Apache-2.0\r
+ */\r
+(function(){this["Handlebars"] = this["Handlebars"] || {};\r
+this["Handlebars"]["templates"] = this["Handlebars"]["templates"] || {};\r
+this["Handlebars"]["templates"]["apikey_auth"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                <span class=\"key_auth__value\">"\r
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))\r
+    + "</span>\n";\r
+},"3":function(depth0,helpers,partials,data) {\r
+  return "                <input placeholder=\"api_key\" class=\"auth_input input_apiKey_entry\" name=\"apiKey\" type=\"text\"/>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class=\"key_input_container\">\n    <h3 class=\"auth__title\">Api key authorization</h3>\n    <div class=\"auth__description\">"\r
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))\r
+    + "</div>\n    <div>\n        <div class=\"key_auth__field\">\n            <span class=\"key_auth__label\">name:</span>\n            <span class=\"key_auth__value\">"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</span>\n        </div>\n        <div class=\"key_auth__field\">\n            <span class=\"key_auth__label\">in:</span>\n            <span class=\"key_auth__value\">"\r
+    + escapeExpression(((helper = (helper = helpers['in'] || (depth0 != null ? depth0['in'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"in","hash":{},"data":data}) : helper)))\r
+    + "</span>\n        </div>\n        <div class=\"key_auth__field\">\n            <span class=\"key_auth__label\">value:</span>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "        </div>\n    </div>\n</div>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["auth_button_operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return "        authorize__btn_operation_login\n";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  return "        authorize__btn_operation_logout\n";\r
+  },"5":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "        <ul class=\"authorize-scopes\">\n";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.scopes : depth0), {"name":"each","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "        </ul>\n";\r
+},"6":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                <li class=\"authorize__scope\" title=\""\r
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))\r
+    + "\">"\r
+    + escapeExpression(((helper = (helper = helpers.scope || (depth0 != null ? depth0.scope : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"scope","hash":{},"data":data}) : helper)))\r
+    + "</li>\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "<div class=\"authorize__btn authorize__btn_operation\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\">\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.scopes : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</div>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["auth_button"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  return "<a class='authorize__btn' href=\"#\">Authorize</a>\n";\r
+  },"useData":true});\r
+this["Handlebars"]["templates"]["auth_view"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return "            <button type=\"button\" class=\"auth__button auth_submit__button\" data-sw-translate>Authorize</button>\n";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  return "            <button type=\"button\" class=\"auth__button auth_logout__button\" data-sw-translate>Logout</button>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "<div class=\"auth_container\">\n\n    <div class=\"auth_inner\"></div>\n    <div class=\"auth_submit\">\n";\r
+  stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isAuthorized : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "    </div>\n\n</div>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["basic_auth"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return " - authorized";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                <span class=\"basic_auth__value\">"\r
+    + escapeExpression(((helper = (helper = helpers.username || (depth0 != null ? depth0.username : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"username","hash":{},"data":data}) : helper)))\r
+    + "</span>\n";\r
+},"5":function(depth0,helpers,partials,data) {\r
+  return "                <input required placeholder=\"username\" class=\"basic_auth__username auth_input\" name=\"username\" type=\"text\"/>\n";\r
+  },"7":function(depth0,helpers,partials,data) {\r
+  return "            <div class=\"auth_label\">\n                <span class=\"basic_auth__label\" data-sw-translate>password:</span>\n                <input required placeholder=\"password\" class=\"basic_auth__password auth_input\" name=\"password\" type=\"password\"/></label>\n            </div>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class='basic_auth_container'>\n    <h3 class=\"auth__title\">Basic authentication";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</h3>\n    <form class=\"basic_input_container\">\n        <div class=\"auth__description\">"\r
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))\r
+    + "</div>\n        <div class=\"auth_label\">\n            <span class=\"basic_auth__label\" data-sw-translate>username:</span>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.program(5, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "        </div>\n";\r
+  stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.isLogout : depth0), {"name":"unless","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "    </form>\n</div>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "     <option value=\""\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "\">"\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "</option>\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  return "  <option value=\"application/json\">application/json</option>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label data-sw-translate for=\""\r
+    + escapeExpression(((helper = (helper = helpers.contentTypeId || (depth0 != null ? depth0.contentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"contentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\">Response Content Type</label>\n<select name=\"contentType\" id=\""\r
+    + escapeExpression(((helper = (helper = helpers.contentTypeId || (depth0 != null ? depth0.contentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"contentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\">\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</select>\n";\r
+},"useData":true});\r
+'use strict';\r
+\r
+\r
+$(function() {\r
+\r
+       // Helper function for vertically aligning DOM elements\r
+       // http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/\r
+       $.fn.vAlign = function() {\r
+               return this.each(function(){\r
+                       var ah = $(this).height();\r
+                       var ph = $(this).parent().height();\r
+                       var mh = (ph - ah) / 2;\r
+                       $(this).css('margin-top', mh);\r
+               });\r
+       };\r
+\r
+       $.fn.stretchFormtasticInputWidthToParent = function() {\r
+               return this.each(function(){\r
+                       var p_width = $(this).closest("form").innerWidth();\r
+                       var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10);\r
+                       var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);\r
+                       $(this).css('width', p_width - p_padding - this_padding);\r
+               });\r
+       };\r
+\r
+       $('form.formtastic li.string input, form.formtastic textarea').stretchFormtasticInputWidthToParent();\r
+\r
+       // Vertically center these paragraphs\r
+       // Parent may need a min-height for this to work..\r
+       $('ul.downplayed li div.content p').vAlign();\r
+\r
+       // When a sandbox form is submitted..\r
+       $("form.sandbox").submit(function(){\r
+\r
+               var error_free = true;\r
+\r
+               // Cycle through the forms required inputs\r
+               $(this).find("input.required").each(function() {\r
+\r
+                       // Remove any existing error styles from the input\r
+                       $(this).removeClass('error');\r
+\r
+                       // Tack the error style on if the input is empty..\r
+                       if ($(this).val() === '') {\r
+                               $(this).addClass('error');\r
+                               $(this).wiggle();\r
+                               error_free = false;\r
+                       }\r
+\r
+               });\r
+\r
+               return error_free;\r
+       });\r
+\r
+});\r
+\r
+function clippyCopiedCallback() {\r
+  $('#api_key_copied').fadeIn().delay(1000).fadeOut();\r
+\r
+  // var b = $("#clippy_tooltip_" + a);\r
+  // b.length != 0 && (b.attr("title", "copied!").trigger("tipsy.reload"), setTimeout(function() {\r
+  //   b.attr("title", "copy to clipboard")\r
+  // },\r
+  // 500))\r
+}\r
+\r
+// Logging function that accounts for browsers that don't have window.console\r
+function log(){\r
+  log.history = log.history || [];\r
+  log.history.push(arguments);\r
+  if(this.console){\r
+    console.log( Array.prototype.slice.call(arguments)[0] );\r
+  }\r
+}\r
+\r
+// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)\r
+if (Function.prototype.bind && console && typeof console.log === "object") {\r
+    [\r
+      "log","info","warn","error","assert","dir","clear","profile","profileEnd"\r
+    ].forEach(function (method) {\r
+        console[method] = this.bind(console[method], console);\r
+    }, Function.prototype.call);\r
+}\r
+\r
+window.Docs = {\r
+\r
+       shebang: function() {\r
+\r
+               // If shebang has an operation nickname in it..\r
+               // e.g. /docs/#!/words/get_search\r
+               var fragments = $.param.fragment().split('/');\r
+               fragments.shift(); // get rid of the bang\r
+\r
+               switch (fragments.length) {\r
+                       case 1:\r
+        if (fragments[0].length > 0) { // prevent matching "#/"\r
+          // Expand all operations for the resource and scroll to it\r
+          var dom_id = 'resource_' + fragments[0];\r
+\r
+          Docs.expandEndpointListForResource(fragments[0]);\r
+          $("#"+dom_id).slideto({highlight: false});\r
+        }\r
+                               break;\r
+                       case 2:\r
+                               // Refer to the endpoint DOM element, e.g. #words_get_search\r
+\r
+        // Expand Resource\r
+        Docs.expandEndpointListForResource(fragments[0]);\r
+        $("#"+dom_id).slideto({highlight: false});\r
+\r
+            // Expand operation\r
+            var li_dom_id = fragments.join('_');\r
+            var li_content_dom_id = li_dom_id + "_content";\r
+\r
+\r
+            Docs.expandOperation($('#'+li_content_dom_id));\r
+            $('#'+li_dom_id).slideto({highlight: false});\r
+            break;\r
+               }\r
+       },\r
+\r
+       toggleEndpointListForResource: function(resource) {\r
+               var elem = $('li#resource_' + Docs.escapeResourceName(resource) + ' ul.endpoints');\r
+               if (elem.is(':visible')) {\r
+                       $.bbq.pushState('#/', 2);\r
+                       Docs.collapseEndpointListForResource(resource);\r
+               } else {\r
+            $.bbq.pushState('#/' + resource, 2);\r
+                       Docs.expandEndpointListForResource(resource);\r
+               }\r
+       },\r
+\r
+       // Expand resource\r
+       expandEndpointListForResource: function(resource) {\r
+               var resource = Docs.escapeResourceName(resource);\r
+               if (resource == '') {\r
+                       $('.resource ul.endpoints').slideDown();\r
+                       return;\r
+               }\r
+\r
+               $('li#resource_' + resource).addClass('active');\r
+\r
+               var elem = $('li#resource_' + resource + ' ul.endpoints');\r
+               elem.slideDown();\r
+       },\r
+\r
+       // Collapse resource and mark as explicitly closed\r
+       collapseEndpointListForResource: function(resource) {\r
+               var resource = Docs.escapeResourceName(resource);\r
+               if (resource == '') {\r
+                       $('.resource ul.endpoints').slideUp();\r
+                       return;\r
+               }\r
+\r
+               $('li#resource_' + resource).removeClass('active');\r
+\r
+               var elem = $('li#resource_' + resource + ' ul.endpoints');\r
+               elem.slideUp();\r
+       },\r
+\r
+       expandOperationsForResource: function(resource) {\r
+               // Make sure the resource container is open..\r
+               Docs.expandEndpointListForResource(resource);\r
+\r
+               if (resource == '') {\r
+                       $('.resource ul.endpoints li.operation div.content').slideDown();\r
+                       return;\r
+               }\r
+\r
+               $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {\r
+                       Docs.expandOperation($(this));\r
+               });\r
+       },\r
+\r
+       collapseOperationsForResource: function(resource) {\r
+               // Make sure the resource container is open..\r
+               Docs.expandEndpointListForResource(resource);\r
+\r
+               if (resource == '') {\r
+                       $('.resource ul.endpoints li.operation div.content').slideUp();\r
+                       return;\r
+               }\r
+\r
+               $('li#resource_' + Docs.escapeResourceName(resource) + ' li.operation div.content').each(function() {\r
+                       Docs.collapseOperation($(this));\r
+               });\r
+       },\r
+\r
+       escapeResourceName: function(resource) {\r
+               return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g, "\\$&");\r
+       },\r
+\r
+       expandOperation: function(elem) {\r
+               elem.slideDown();\r
+       },\r
+\r
+       collapseOperation: function(elem) {\r
+               elem.slideUp();\r
+       }\r
+};\r
+\r
+'use strict';\r
+/*jslint eqeq: true*/\r
+\r
+Handlebars.registerHelper('sanitize', function(html) {\r
+    // Strip the script tags from the html, and return it as a Handlebars.SafeString\r
+    html = html.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '');\r
+    return new Handlebars.SafeString(html);\r
+});\r
+\r
+Handlebars.registerHelper('renderTextParam', function(param) {\r
+    var result, type = 'text', idAtt = '';\r
+    var paramType = param.type || param.schema.type || '';\r
+    var isArray = paramType.toLowerCase() === 'array' || param.allowMultiple;\r
+    var defaultValue = isArray && Array.isArray(param.default) ? param.default.join('\n') : param.default;\r
+\r
+    var dataVendorExtensions = Object.keys(param).filter(function(property) {\r
+        // filter X-data- properties\r
+        return property.match(/^X-data-/i) !== null;\r
+    }).reduce(function(result, property) {\r
+        // remove X- from property name, so it results in html attributes like data-foo='bar'\r
+        return result += ' ' + property.substring(2, property.length) + '=\'' + param[property] + '\'';\r
+    }, '');\r
+\r
+    if (typeof defaultValue === 'undefined') {\r
+        defaultValue = '';\r
+    }\r
+\r
+    if(param.format && param.format === 'password') {\r
+        type = 'password';\r
+    }\r
+\r
+    if(param.valueId) {\r
+        idAtt = ' id=\'' + param.valueId + '\'';\r
+    }\r
+\r
+    if (typeof defaultValue === 'string' || defaultValue instanceof String) {\r
+        defaultValue = defaultValue.replace(/'/g,'&apos;');\r
+    }\r
+\r
+    if(isArray) {\r
+        result = '<textarea class=\'body-textarea' + (param.required ? ' required' : '') + '\' name=\'' + param.name + '\'' + idAtt + dataVendorExtensions;\r
+        result += ' placeholder=\'Provide multiple values in new lines' + (param.required ? ' (at least one required).' : '.') + '\'>';\r
+        result += defaultValue + '</textarea>';\r
+    } else {\r
+        var parameterClass = 'parameter';\r
+        if(param.required) {\r
+          parameterClass += ' required';\r
+        }\r
+        result = '<input class=\'' + parameterClass + '\' minlength=\'' + (param.required ? 1 : 0) + '\'';\r
+        result += ' name=\'' + param.name +'\' placeholder=\'' + (param.required ? '(required)' : '') + '\'' + idAtt + dataVendorExtensions;\r
+        result += ' type=\'' + type + '\' value=\'' + defaultValue + '\'/>';\r
+    }\r
+    return new Handlebars.SafeString(result);\r
+});\r
+\r
+Handlebars.registerHelper('ifCond', function (v1, operator, v2, options) {\r
+\r
+    switch (operator) {\r
+        case '==':\r
+            return (v1 == v2) ? options.fn(this) : options.inverse(this);\r
+        case '===':\r
+            return (v1 === v2) ? options.fn(this) : options.inverse(this);\r
+        case '<':\r
+            return (v1 < v2) ? options.fn(this) : options.inverse(this);\r
+        case '<=':\r
+            return (v1 <= v2) ? options.fn(this) : options.inverse(this);\r
+        case '>':\r
+            return (v1 > v2) ? options.fn(this) : options.inverse(this);\r
+        case '>=':\r
+            return (v1 >= v2) ? options.fn(this) : options.inverse(this);\r
+        case '&&':\r
+            return (v1 && v2) ? options.fn(this) : options.inverse(this);\r
+        case '||':\r
+            return (v1 || v2) ? options.fn(this) : options.inverse(this);\r
+        default:\r
+            return options.inverse(this);\r
+    }\r
+});\r
+this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression, buffer = "  <div class=\"info_title\">"\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))\r
+    + "</div>\n  <div class=\"info_description markdown\">";\r
+  stack1 = lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.description : stack1), depth0);\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</div>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.externalDocs : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "  ";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  ";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), {"name":"if","hash":{},"fn":this.program(6, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  ";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), {"name":"if","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  ";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  ";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "\n";\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "  <p>"\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.description : stack1), depth0))\r
+    + "</p>\n  <a href=\""\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0))\r
+    + "\" target=\"_blank\">"\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.externalDocs : depth0)) != null ? stack1.url : stack1), depth0))\r
+    + "</a>\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "<div class=\"info_tos\"><a target=\"_blank\" href=\""\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.termsOfServiceUrl : stack1), depth0))\r
+    + "\" data-sw-translate>Terms of service</a></div>";\r
+},"6":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "<div class='info_name' data-sw-translate>Created by "\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.name : stack1), depth0))\r
+    + "</div>";\r
+},"8":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "<div class='info_url' data-sw-translate>See more at <a href=\""\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))\r
+    + "\">"\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.url : stack1), depth0))\r
+    + "</a></div>";\r
+},"10":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "<div class='info_email'><a target=\"_parent\" href=\"mailto:"\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.contact : stack1)) != null ? stack1.email : stack1), depth0))\r
+    + "?subject="\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.title : stack1), depth0))\r
+    + "\" data-sw-translate>Contact the developer</a></div>";\r
+},"12":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "<div class='info_license'><a target=\"_blank\" href='"\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.url : stack1), depth0))\r
+    + "'>"\r
+    + escapeExpression(lambda(((stack1 = ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.license : stack1)) != null ? stack1.name : stack1), depth0))\r
+    + "</a></div>";\r
+},"14":function(depth0,helpers,partials,data) {\r
+  var stack1, lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "  , <span style=\"font-variant: small-caps\" data-sw-translate>api version</span>: "\r
+    + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0))\r
+    + "\n    ";\r
+},"16":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "    <span style=\"float:right\"><a target=\"_blank\" href=\""\r
+    + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper)))\r
+    + "/debug?url="\r
+    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))\r
+    + "\"><img id=\"validator\" src=\""\r
+    + escapeExpression(((helper = (helper = helpers.validatorUrl || (depth0 != null ? depth0.validatorUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"validatorUrl","hash":{},"data":data}) : helper)))\r
+    + "?url="\r
+    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))\r
+    + "\"></a>\n    </span>\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div class='info' id='api_info'>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.info : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</div>\n<div class='container' id='resources_container'>\n  <div class='authorize-wrapper'></div>\n\n  <ul id='resources'></ul>\n\n  <div class=\"footer\">\n    <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "\r
+    + escapeExpression(((helper = (helper = helpers.basePath || (depth0 != null ? depth0.basePath : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"basePath","hash":{},"data":data}) : helper)))\r
+    + "\n";\r
+  stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), {"name":"if","hash":{},"fn":this.program(14, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "]\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.validatorUrl : depth0), {"name":"if","hash":{},"fn":this.program(16, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "    </h4>\n    </div>\n</div>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["oauth2"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "            <li>\n                <input class=\"oauth-scope\" type=\"checkbox\" data-scope=\""\r
+    + escapeExpression(((helper = (helper = helpers.scope || (depth0 != null ? depth0.scope : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"scope","hash":{},"data":data}) : helper)))\r
+    + "\" oauthtype=\""\r
+    + escapeExpression(((helper = (helper = helpers.OAuthSchemeKey || (depth0 != null ? depth0.OAuthSchemeKey : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"OAuthSchemeKey","hash":{},"data":data}) : helper)))\r
+    + "\"/>\n                <label>"\r
+    + escapeExpression(((helper = (helper = helpers.scope || (depth0 != null ? depth0.scope : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"scope","hash":{},"data":data}) : helper)))\r
+    + "</label><br/>\n                <span class=\"api-scope-desc\">"\r
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))\r
+    + "\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.OAuthSchemeKey : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "                </span>\n            </li>\n";\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                        ("\r
+    + escapeExpression(((helper = (helper = helpers.OAuthSchemeKey || (depth0 != null ? depth0.OAuthSchemeKey : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"OAuthSchemeKey","hash":{},"data":data}) : helper)))\r
+    + ")\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<div>\n    <h3 class=\"auth__title\">Select OAuth2.0 Scopes</h3>\n    <p>"\r
+    + escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper)))\r
+    + "</p>\n    <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n        <a href=\"#\">Learn how to use</a>\n    </p>\n    <p><strong> "\r
+    + escapeExpression(((helper = (helper = helpers.appName || (depth0 != null ? depth0.appName : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"appName","hash":{},"data":data}) : helper)))\r
+    + " </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n    <p>Authorization URL: "\r
+    + escapeExpression(((helper = (helper = helpers.authorizationUrl || (depth0 != null ? depth0.authorizationUrl : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"authorizationUrl","hash":{},"data":data}) : helper)))\r
+    + "</p>\n    <p>flow: "\r
+    + escapeExpression(((helper = (helper = helpers.flow || (depth0 != null ? depth0.flow : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"flow","hash":{},"data":data}) : helper)))\r
+    + "</p>\n    <ul class=\"api-popup-scopes\">\n";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.scopes : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "    </ul>\n</div>";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["operation"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return "deprecated";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  return "            <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n";\r
+  },"5":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "        <h4><span data-sw-translate>Implementation Notes</span></h4>\n        <div class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</div>\n";\r
+},"7":function(depth0,helpers,partials,data) {\r
+  return "            <div class='authorize-wrapper authorize-wrapper_operation'></div>\n";\r
+  },"9":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "          <div class=\"response-class\">\n            <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> "\r
+    + escapeExpression(((helper = (helper = helpers.successCode || (depth0 != null ? depth0.successCode : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successCode","hash":{},"data":data}) : helper)))\r
+    + ")</h4>\n              ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.successDescription : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "\n            <p><span class=\"model-signature\" /></p>\n            <br/>\n            <div class=\"response-content-type\" />\n            </div>\n";\r
+},"10":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "<div class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.successDescription || (depth0 != null ? depth0.successDescription : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"successDescription","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</div>";\r
+},"12":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "          <h4 data-sw-translate>Headers</h4>\n          <table class=\"headers\">\n            <thead>\n              <tr>\n                <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Header</th>\n                <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Description</th>\n                <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Type</th>\n                <th style=\"width: 320px; max-width: 320px\" data-sw-translate>Other</th>\n              </tr>\n            </thead>\n            <tbody>\n";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "            </tbody>\n          </table>\n";\r
+},"13":function(depth0,helpers,partials,data) {\r
+  var lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "              <tr>\n                <td>"\r
+    + escapeExpression(lambda((data && data.key), depth0))\r
+    + "</td>\n                <td>"\r
+    + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0))\r
+    + "</td>\n                <td>"\r
+    + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0))\r
+    + "</td>\n                <td>"\r
+    + escapeExpression(lambda((depth0 != null ? depth0.other : depth0), depth0))\r
+    + "</td>\n              </tr>\n";\r
+},"15":function(depth0,helpers,partials,data) {\r
+  return "          <h4 data-sw-translate>Parameters</h4>\n          <table class='fullwidth'>\n          <thead>\n            <tr>\n            <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter</th>\n            <th style=\"width: 310px; max-width: 310px\" data-sw-translate>Value</th>\n            <th style=\"width: 200px; max-width: 200px\" data-sw-translate>Description</th>\n            <th style=\"width: 100px; max-width: 100px\" data-sw-translate>Parameter Type</th>\n            <th style=\"width: 220px; max-width: 230px\" data-sw-translate>Data Type</th>\n            </tr>\n          </thead>\n          <tbody class=\"operation-params\">\n\n          </tbody>\n          </table>\n";\r
+  },"17":function(depth0,helpers,partials,data) {\r
+  return "          <div style='margin:0;padding:0;display:inline'></div>\n          <h4 data-sw-translate>Response Messages</h4>\n          <table class='fullwidth'>\n            <thead>\n            <tr>\n              <th data-sw-translate>HTTP Status Code</th>\n              <th data-sw-translate>Reason</th>\n              <th data-sw-translate>Response Model</th>\n              <th data-sw-translate>Headers</th>\n            </tr>\n            </thead>\n            <tbody class=\"operation-status\">\n            </tbody>\n          </table>\n";\r
+  },"19":function(depth0,helpers,partials,data) {\r
+  return "";\r
+},"21":function(depth0,helpers,partials,data) {\r
+  return "          <div class='sandbox_header'>\n            <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n            <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n            <span class='response_throbber' style='display:none'></span>\n          </div>\n";\r
+  },"23":function(depth0,helpers,partials,data) {\r
+  return "          <h4 data-sw-translate>Request Headers</h4>\n          <div class='block request_headers'></div>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "  <ul class='operations' >\n    <li class='"\r
+    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))\r
+    + " operation' id='"\r
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))\r
+    + "_"\r
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))\r
+    + "'>\n      <div class='heading'>\n        <h3>\n          <span class='http_method'>\n          <a href='#!/"\r
+    + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper)))\r
+    + "/"\r
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))\r
+    + "' class=\"toggleOperation\">"\r
+    + escapeExpression(((helper = (helper = helpers.method || (depth0 != null ? depth0.method : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"method","hash":{},"data":data}) : helper)))\r
+    + "</a>\n          </span>\n          <span class='path'>\n          <a href='#!/"\r
+    + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper)))\r
+    + "/"\r
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))\r
+    + "' class=\"toggleOperation ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\">"\r
+    + escapeExpression(((helper = (helper = helpers.path || (depth0 != null ? depth0.path : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"path","hash":{},"data":data}) : helper)))\r
+    + "</a>\n          </span>\n        </h3>\n        <ul class='options'>\n          <li>\n          <a href='#!/"\r
+    + escapeExpression(((helper = (helper = helpers.encodedParentId || (depth0 != null ? depth0.encodedParentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"encodedParentId","hash":{},"data":data}) : helper)))\r
+    + "/"\r
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))\r
+    + "' class=\"toggleOperation\">";\r
+  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</a>\n          </li>\n        </ul>\n      </div>\n      <div class='content' id='"\r
+    + escapeExpression(((helper = (helper = helpers.parentId || (depth0 != null ? depth0.parentId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parentId","hash":{},"data":data}) : helper)))\r
+    + "_"\r
+    + escapeExpression(((helper = (helper = helpers.nickname || (depth0 != null ? depth0.nickname : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"nickname","hash":{},"data":data}) : helper)))\r
+    + "_content' style='display:none'>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.deprecated : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.description : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.security : depth0), {"name":"if","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.type : depth0), {"name":"if","hash":{},"fn":this.program(9, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"if","hash":{},"fn":this.program(12, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n        <form accept-charset='UTF-8' class='sandbox'>\n          <div style='margin:0;padding:0;display:inline'></div>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.parameters : depth0), {"name":"if","hash":{},"fn":this.program(15, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.responseMessages : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isReadOnly : depth0), {"name":"if","hash":{},"fn":this.program(19, data),"inverse":this.program(21, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "        </form>\n        <div class='response' style='display:none'>\n          <h4 class='curl'>Curl</h4>\n          <div class='block curl'></div>\n          <h4 data-sw-translate>Request URL</h4>\n          <div class='block request_url'></div>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.showRequestHeaders : depth0), {"name":"if","hash":{},"fn":this.program(23, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "          <h4 data-sw-translate>Response Body</h4>\n          <div class='block response_body'></div>\n          <h4 data-sw-translate>Response Code</h4>\n          <div class='block response_code'></div>\n          <h4 data-sw-translate>Response Headers</h4>\n          <div class='block response_headers'></div>\n        </div>\n      </div>\n    </li>\n  </ul>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return " required";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  return " multiple=\"multiple\"";\r
+  },"5":function(depth0,helpers,partials,data) {\r
+  return " required ";\r
+  },"7":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "      <option ";\r
+  stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.hasDefault : depth0), {"name":"unless","hash":{},"fn":this.program(8, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + " value=''></option>\n";\r
+},"8":function(depth0,helpers,partials,data) {\r
+  return "  selected=\"\" ";\r
+  },"10":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "\n      <option ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "  value='"\r
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))\r
+    + "'> "\r
+    + escapeExpression(((helper = (helper = helpers.value || (depth0 != null ? depth0.value : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"value","hash":{},"data":data}) : helper)))\r
+    + " ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isDefault : depth0), {"name":"if","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + " </option>\n\n";\r
+},"11":function(depth0,helpers,partials,data) {\r
+  return " selected=\"\"  ";\r
+  },"13":function(depth0,helpers,partials,data) {\r
+  return " (default) ";\r
+  },"15":function(depth0,helpers,partials,data) {\r
+  return "<strong>";\r
+  },"17":function(depth0,helpers,partials,data) {\r
+  return "</strong>";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "'><label for='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</label></td>\n<td>\n  <select ";\r
+  stack1 = ((helpers.isArray || (depth0 && depth0.isArray) || helperMissing).call(depth0, depth0, {"name":"isArray","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data}));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += " class=\"parameter ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\" name=\""\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "\" id=\""\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "\">\n\n";\r
+  stack1 = helpers.unless.call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"unless","hash":{},"fn":this.program(7, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n";\r
+  stack1 = helpers.each.call(depth0, ((stack1 = (depth0 != null ? depth0.allowableValues : depth0)) != null ? stack1.descriptiveValues : stack1), {"name":"each","hash":{},"fn":this.program(10, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  </select>\n</td>\n<td class=\"markdown\">";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(15, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.required : depth0), {"name":"if","hash":{},"fn":this.program(17, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td>";\r
+  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["param_readonly_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "        <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "</textarea>\n";\r
+},"3":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"4":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "            "\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "\n";\r
+},"6":function(depth0,helpers,partials,data) {\r
+  return "            (empty)\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'><label for='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</label></td>\n<td>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td>";\r
+  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["param_readonly"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "        <textarea class='body-textarea' readonly='readonly' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "</textarea>\n        <div class=\"parameter-content-type\" />\n";\r
+},"3":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(4, data),"inverse":this.program(6, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"4":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "            "\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "\n";\r
+},"6":function(depth0,helpers,partials,data) {\r
+  return "            (empty)\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'><label for='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</label></td>\n<td>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(3, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td>";\r
+  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                     <input type=\"file\" name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'/>\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"5":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                             <div class=\"editor_holder\"></div>\n                           <textarea class='body-textarea required' placeholder='(required)' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id=\""\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "\">"\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "</textarea>\n        <br />\n        <div class=\"parameter-content-type\" />\n";\r
+},"7":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                             <textarea class='body-textarea required' placeholder='(required)' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'></textarea>\n                         <div class=\"editor_holder\"></div>\n                           <br />\n                                <div class=\"parameter-content-type\" />\n";\r
+},"9":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(10, data),"inverse":this.program(12, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"10":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                     <input class='parameter' class='required' type='file' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'/>\n";\r
+},"12":function(depth0,helpers,partials,data) {\r
+  var stack1, helperMissing=helpers.helperMissing, buffer = "";\r
+  stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(13, data),"inverse":this.noop,"data":data}));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"13":function(depth0,helpers,partials,data) {\r
+  return "";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code required'><label for='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</label></td>\n<td>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td>\n     <strong><span class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</span></strong>\n</td>\n<td>";\r
+  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</td>\n<td><span class=\"model-signature\"></span></td>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(4, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                     <input type=\"file\" name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'/>\n                   <div class=\"parameter-content-type\" />\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0['default'] : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.program(7, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"5":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                             <div class=\"editor_holder\"></div>\n                           <textarea class='body-textarea' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers['default'] || (depth0 != null ? depth0['default'] : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"default","hash":{},"data":data}) : helper)))\r
+    + "</textarea>\n        <br />\n        <div class=\"parameter-content-type\" />\n";\r
+},"7":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "                             <textarea class='body-textarea' name='"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "' id='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'></textarea>\n                         <div class=\"editor_holder\"></div>\n                           <br />\n                                <div class=\"parameter-content-type\" />\n";\r
+},"9":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isFile : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.program(10, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"10":function(depth0,helpers,partials,data) {\r
+  var stack1, helperMissing=helpers.helperMissing, buffer = "";\r
+  stack1 = ((helpers.renderTextParam || (depth0 && depth0.renderTextParam) || helperMissing).call(depth0, depth0, {"name":"renderTextParam","hash":{},"fn":this.program(11, data),"inverse":this.noop,"data":data}));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"11":function(depth0,helpers,partials,data) {\r
+  return "";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td class='code'><label for='"\r
+    + escapeExpression(((helper = (helper = helpers.valueId || (depth0 != null ? depth0.valueId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"valueId","hash":{},"data":data}) : helper)))\r
+    + "'>"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</label></td>\n<td>\n\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isBody : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(9, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n</td>\n<td class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"description","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td>";\r
+  stack1 = ((helper = (helper = helpers.paramType || (depth0 != null ? depth0.paramType : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"paramType","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</td>\n<td>\n       <span class=\"model-signature\"></span>\n</td>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["parameter_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "  <option value=\""\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "\">"\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "</option>\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  return "  <option value=\"application/json\">application/json</option>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label for=\""\r
+    + escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parameterContentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\" data-sw-translate>Parameter content type:</label>\n<select name=\"parameterContentType\" id=\""\r
+    + escapeExpression(((helper = (helper = helpers.parameterContentTypeId || (depth0 != null ? depth0.parameterContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"parameterContentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\">\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.consumes : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</select>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["popup"] = Handlebars.template({"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "<div class=\"api-popup-dialog-wrapper\">\n    <div class=\"api-popup-title\">"\r
+    + escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"title","hash":{},"data":data}) : helper)))\r
+    + "</div>\n    <div class=\"api-popup-content\"></div>\n    <p class=\"error-msg\"></p>\n    <div class=\"api-popup-actions\">\n        <button class=\"api-popup-cancel api-button gray\" type=\"button\">Cancel</button>\n    </div>\n</div>\n<div class=\"api-popup-dialog-shadow\"></div>";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["resource"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  return " : ";\r
+  },"3":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "    <li>\n      <a href='"\r
+    + escapeExpression(((helper = (helper = helpers.url || (depth0 != null ? depth0.url : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"url","hash":{},"data":data}) : helper)))\r
+    + "' data-sw-translate>Raw</a>\n    </li>\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, options, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, blockHelperMissing=helpers.blockHelperMissing, buffer = "<div class='heading'>\n  <h2>\n    <a href='#!/"\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "' class=\"toggleEndpointList\" data-id=\""\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "\">"\r
+    + escapeExpression(((helper = (helper = helpers.name || (depth0 != null ? depth0.name : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"name","hash":{},"data":data}) : helper)))\r
+    + "</a> ";\r
+  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(options={"name":"summary","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data}),(typeof helper === functionType ? helper.call(depth0, options) : helper));\r
+  if (!helpers.summary) { stack1 = blockHelperMissing.call(depth0, stack1, options); }\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = ((helper = (helper = helpers.summary || (depth0 != null ? depth0.summary : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"summary","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  </h2>\n  <ul class='options'>\n    <li>\n      <a href='#!/"\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "' id='endpointListTogger_"\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "' class=\"toggleEndpointList\" data-id=\""\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "\" data-sw-translate>Show/Hide</a>\n    </li>\n    <li>\n      <a href='#' class=\"collapseResource\" data-id=\""\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "\" data-sw-translate>\n        List Operations\n      </a>\n    </li>\n    <li>\n      <a href='#' class=\"expandResource\" data-id=\""\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "\" data-sw-translate>\n        Expand Operations\n      </a>\n    </li>\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.url : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "  </ul>\n</div>\n<ul class='endpoints' id='"\r
+    + escapeExpression(((helper = (helper = helpers.id || (depth0 != null ? depth0.id : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"id","hash":{},"data":data}) : helper)))\r
+    + "_endpoint_list' style='display:none'>\n\n</ul>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, buffer = "";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"each","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer;\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "  <option value=\""\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "\">"\r
+    + escapeExpression(lambda(depth0, depth0))\r
+    + "</option>\n";\r
+},"4":function(depth0,helpers,partials,data) {\r
+  return "  <option value=\"application/json\">application/json</option>\n";\r
+  },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<label data-sw-translate for=\""\r
+    + escapeExpression(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"responseContentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\">Response Content Type</label>\n<select name=\"responseContentType\" id=\""\r
+    + escapeExpression(((helper = (helper = helpers.responseContentTypeId || (depth0 != null ? depth0.responseContentTypeId : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"responseContentTypeId","hash":{},"data":data}) : helper)))\r
+    + "\">\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "</select>\n";\r
+},"useData":true});\r
+this["Handlebars"]["templates"]["signature"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, buffer = "\n<div>\n<ul class=\"signature-nav\">\n  <li><a class=\"description-link\" href=\"#\" data-sw-translate>Model</a></li>\n  <li><a class=\"snippet-link\" href=\"#\" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class=\"signature-container\">\n  <div class=\"description\">\n    ";\r
+  stack1 = ((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "\n  </div>\n\n  <div class=\"snippet\">\n";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleJSON : depth0), {"name":"if","hash":{},"fn":this.program(2, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.sampleXML : depth0), {"name":"if","hash":{},"fn":this.program(5, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "  </div>\n</div>\n";\r
+},"2":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "      <div class=\"snippet_json\">\n        <pre><code>"\r
+    + escapeExpression(((helper = (helper = helpers.sampleJSON || (depth0 != null ? depth0.sampleJSON : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleJSON","hash":{},"data":data}) : helper)))\r
+    + "</code></pre>\n        ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "\n      </div>\n";\r
+},"3":function(depth0,helpers,partials,data) {\r
+  return "<small class=\"notice\" data-sw-translate></small>";\r
+  },"5":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "    <div class=\"snippet_xml\">\n      <pre><code>"\r
+    + escapeExpression(((helper = (helper = helpers.sampleXML || (depth0 != null ? depth0.sampleXML : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"sampleXML","hash":{},"data":data}) : helper)))\r
+    + "</code></pre>\n      ";\r
+  stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.isParam : depth0), {"name":"if","hash":{},"fn":this.program(3, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "\n    </div>\n";\r
+},"7":function(depth0,helpers,partials,data) {\r
+  var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;\r
+  return "    "\r
+    + escapeExpression(((helper = (helper = helpers.signature || (depth0 != null ? depth0.signature : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"signature","hash":{},"data":data}) : helper)))\r
+    + "\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helperMissing=helpers.helperMissing;\r
+  stack1 = ((helpers.ifCond || (depth0 && depth0.ifCond) || helperMissing).call(depth0, (depth0 != null ? depth0.sampleJSON : depth0), "||", (depth0 != null ? depth0.sampleXML : depth0), {"name":"ifCond","hash":{},"fn":this.program(1, data),"inverse":this.program(7, data),"data":data}));\r
+  if (stack1 != null) { return stack1; }\r
+  else { return ''; }\r
+  },"useData":true});\r
+this["Handlebars"]["templates"]["status_code"] = Handlebars.template({"1":function(depth0,helpers,partials,data) {\r
+  var lambda=this.lambda, escapeExpression=this.escapeExpression;\r
+  return "      <tr>\n        <td>"\r
+    + escapeExpression(lambda((data && data.key), depth0))\r
+    + "</td>\n        <td>"\r
+    + escapeExpression(lambda((depth0 != null ? depth0.description : depth0), depth0))\r
+    + "</td>\n        <td>"\r
+    + escapeExpression(lambda((depth0 != null ? depth0.type : depth0), depth0))\r
+    + "</td>\n      </tr>\n";\r
+},"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) {\r
+  var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "<td width='15%' class='code'>"\r
+    + escapeExpression(((helper = (helper = helpers.code || (depth0 != null ? depth0.code : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"code","hash":{},"data":data}) : helper)))\r
+    + "</td>\n<td class=\"markdown\">";\r
+  stack1 = ((helper = (helper = helpers.message || (depth0 != null ? depth0.message : depth0)) != null ? helper : helperMissing),(typeof helper === functionType ? helper.call(depth0, {"name":"message","hash":{},"data":data}) : helper));\r
+  if (stack1 != null) { buffer += stack1; }\r
+  buffer += "</td>\n<td width='50%'><span class=\"model-signature\" /></td>\n<td class=\"headers\">\n  <table>\n    <tbody>\n";\r
+  stack1 = helpers.each.call(depth0, (depth0 != null ? depth0.headers : depth0), {"name":"each","hash":{},"fn":this.program(1, data),"inverse":this.noop,"data":data});\r
+  if (stack1 != null) { buffer += stack1; }\r
+  return buffer + "    </tbody>\n  </table>\n</td>";\r
+},"useData":true});\r
+/**\r
+ * swagger-client - swagger-client is a javascript client for use with swaggering APIs.\r
+ * @version v2.1.14\r
+ * @link http://swagger.io\r
+ * @license Apache-2.0\r
+ */\r
+(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwaggerClient = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){\r
+'use strict';\r
+\r
+var auth = require('./lib/auth');\r
+var helpers = require('./lib/helpers');\r
+var SwaggerClient = require('./lib/client');\r
+var deprecationWrapper = function (url, options) {\r
+  helpers.log('This is deprecated, use "new SwaggerClient" instead.');\r
+\r
+  return new SwaggerClient(url, options);\r
+};\r
+\r
+/* Here for IE8 Support */\r
+if (!Array.prototype.indexOf) {\r
+  Array.prototype.indexOf = function(obj, start) {\r
+    for (var i = (start || 0), j = this.length; i < j; i++) {\r
+      if (this[i] === obj) { return i; }\r
+    }\r
+    return -1;\r
+  };\r
+}\r
+\r
+/* Here for IE8 Support */\r
+if (!String.prototype.trim) {\r
+  String.prototype.trim = function () {\r
+    return this.replace(/^\s+|\s+$/g, '');\r
+  };\r
+}\r
+\r
+/* Here for node 10.x support */\r
+if (!String.prototype.endsWith) {\r
+  String.prototype.endsWith = function(suffix) {\r
+    return this.indexOf(suffix, this.length - suffix.length) !== -1;\r
+  };\r
+}\r
+\r
+module.exports = SwaggerClient;\r
+\r
+SwaggerClient.ApiKeyAuthorization = auth.ApiKeyAuthorization;\r
+SwaggerClient.PasswordAuthorization = auth.PasswordAuthorization;\r
+SwaggerClient.CookieAuthorization = auth.CookieAuthorization;\r
+SwaggerClient.SwaggerApi = deprecationWrapper;\r
+SwaggerClient.SwaggerClient = deprecationWrapper;\r
+SwaggerClient.SchemaMarkup = require('./lib/schema-markup');\r
+\r
+},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4,"./lib/schema-markup":7}],2:[function(require,module,exports){\r
+'use strict';\r
+\r
+var helpers = require('./helpers');\r
+var btoa = require('btoa'); // jshint ignore:line\r
+var CookieJar = require('cookiejar').CookieJar;\r
+var _ = {\r
+  each: require('lodash-compat/collection/each'),\r
+  includes: require('lodash-compat/collection/includes'),\r
+  isObject: require('lodash-compat/lang/isObject'),\r
+  isArray: require('lodash-compat/lang/isArray')\r
+};\r
+\r
+/**\r
+ * SwaggerAuthorizations applys the correct authorization to an operation being executed\r
+ */\r
+var SwaggerAuthorizations = module.exports.SwaggerAuthorizations = function (authz) {\r
+  this.authz = authz || {};\r
+};\r
+\r
+/**\r
+ * Add auths to the hash\r
+ * Will overwrite any existing\r
+ *\r
+ */\r
+SwaggerAuthorizations.prototype.add = function (name, auth) {\r
+  if(_.isObject(name)) {\r
+    for (var key in name) {\r
+      this.authz[key] = name[key];\r
+    }\r
+  } else if(typeof name === 'string' ){\r
+    this.authz[name] = auth;\r
+  }\r
+\r
+  return auth;\r
+};\r
+\r
+SwaggerAuthorizations.prototype.remove = function (name) {\r
+  return delete this.authz[name];\r
+};\r
+\r
+SwaggerAuthorizations.prototype.apply = function (obj, securities) {\r
+  var status = true;\r
+  var applyAll = !securities;\r
+  var flattenedSecurities = [];\r
+\r
+  // favor the object-level authorizations over global\r
+  var authz = obj.clientAuthorizations || this.authz;\r
+\r
+  // Securities could be [ {} ]\r
+  _.each(securities, function (obj, key) {\r
+\r
+    // Make sure we account for securities being [ str ]\r
+    if(typeof key === 'string') {\r
+      flattenedSecurities.push(key);\r
+    }\r
+\r
+    // Flatten keys in to our array\r
+    _.each(obj, function (val, key) {\r
+      flattenedSecurities.push(key);\r
+    });\r
+  });\r
+\r
+  _.each(authz, function (auth, authName) {\r
+    if(applyAll || _.includes(flattenedSecurities, authName)) {\r
+      var newStatus = auth.apply(obj);\r
+      status = status && !!newStatus; // logical ORs regarding status\r
+    }\r
+  });\r
+\r
+  return status;\r
+};\r
+\r
+/**\r
+ * ApiKeyAuthorization allows a query param or header to be injected\r
+ */\r
+var ApiKeyAuthorization = module.exports.ApiKeyAuthorization = function (name, value, type) {\r
+  this.name = name;\r
+  this.value = value;\r
+  this.type = type;\r
+};\r
+\r
+ApiKeyAuthorization.prototype.apply = function (obj) {\r
+  if (this.type === 'query') {\r
+    // see if already applied.  If so, don't do it again\r
+\r
+    var qp;\r
+    if (obj.url.indexOf('?') > 0) {\r
+      qp = obj.url.substring(obj.url.indexOf('?') + 1);\r
+      var parts = qp.split('&');\r
+      if(parts && parts.length > 0) {\r
+        for(var i = 0; i < parts.length; i++) {\r
+          var kv = parts[i].split('=');\r
+          if(kv && kv.length > 0) {\r
+            if (kv[0] === this.name) {\r
+              // skip it\r
+              return false;\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+\r
+    if (obj.url.indexOf('?') > 0) {\r
+      obj.url = obj.url + '&' + this.name + '=' + this.value;\r
+    } else {\r
+      obj.url = obj.url + '?' + this.name + '=' + this.value;\r
+    }\r
+\r
+    return true;\r
+  } else if (this.type === 'header') {\r
+    if(typeof obj.headers[this.name] === 'undefined') {\r
+      obj.headers[this.name] = this.value;\r
+    }\r
+\r
+    return true;\r
+  }\r
+};\r
+\r
+var CookieAuthorization = module.exports.CookieAuthorization = function (cookie) {\r
+  this.cookie = cookie;\r
+};\r
+\r
+CookieAuthorization.prototype.apply = function (obj) {\r
+  obj.cookieJar = obj.cookieJar || new CookieJar();\r
+  obj.cookieJar.setCookie(this.cookie);\r
+\r
+  return true;\r
+};\r
+\r
+/**\r
+ * Password Authorization is a basic auth implementation\r
+ */\r
+var PasswordAuthorization = module.exports.PasswordAuthorization = function (username, password) {\r
+  if (arguments.length === 3) {\r
+    helpers.log('PasswordAuthorization: the \'name\' argument has been removed, pass only username and password');\r
+    username = arguments[1];\r
+    password = arguments[2];\r
+  }\r
+  this.username = username;\r
+  this.password = password;\r
+};\r
+\r
+PasswordAuthorization.prototype.apply = function (obj) {\r
+  if(typeof obj.headers.Authorization === 'undefined') {\r
+    obj.headers.Authorization = 'Basic ' + btoa(this.username + ':' + this.password);\r
+  }\r
+\r
+  return true;\r
+};\r
+\r
+},{"./helpers":4,"btoa":14,"cookiejar":20,"lodash-compat/collection/each":54,"lodash-compat/collection/includes":57,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isObject":146}],3:[function(require,module,exports){\r
+'use strict';\r
+\r
+var _ = {\r
+  bind: require('lodash-compat/function/bind'),\r
+  cloneDeep: require('lodash-compat/lang/cloneDeep'),\r
+  find: require('lodash-compat/collection/find'),\r
+  forEach: require('lodash-compat/collection/forEach'),\r
+  indexOf: require('lodash-compat/array/indexOf'),\r
+  isArray: require('lodash-compat/lang/isArray'),\r
+  isObject: require('lodash-compat/lang/isObject'),\r
+  isFunction: require('lodash-compat/lang/isFunction'),\r
+  isPlainObject: require('lodash-compat/lang/isPlainObject'),\r
+  isUndefined: require('lodash-compat/lang/isUndefined')\r
+};\r
+var auth = require('./auth');\r
+var helpers = require('./helpers');\r
+var Model = require('./types/model');\r
+var Operation = require('./types/operation');\r
+var OperationGroup = require('./types/operationGroup');\r
+var Resolver = require('./resolver');\r
+var SwaggerHttp = require('./http');\r
+var SwaggerSpecConverter = require('./spec-converter');\r
+var Q = require('q');\r
+\r
+// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the\r
+// following usage: 'client.{tagName}'\r
+var reservedClientTags = [\r
+  'apis',\r
+  'authorizationScheme',\r
+  'authorizations',\r
+  'basePath',\r
+  'build',\r
+  'buildFrom1_1Spec',\r
+  'buildFrom1_2Spec',\r
+  'buildFromSpec',\r
+  'clientAuthorizations',\r
+  'convertInfo',\r
+  'debug',\r
+  'defaultErrorCallback',\r
+  'defaultSuccessCallback',\r
+  'enableCookies',\r
+  'fail',\r
+  'failure',\r
+  'finish',\r
+  'help',\r
+  'host',\r
+  'idFromOp',\r
+  'info',\r
+  'initialize',\r
+  'isBuilt',\r
+  'isValid',\r
+  'modelPropertyMacro',\r
+  'models',\r
+  'modelsArray',\r
+  'options',\r
+  'parameterMacro',\r
+  'parseUri',\r
+  'progress',\r
+  'resourceCount',\r
+  'sampleModels',\r
+  'selfReflect',\r
+  'setConsolidatedModels',\r
+  'spec',\r
+  'supportedSubmitMethods',\r
+  'swaggerRequestHeaders',\r
+  'tagFromLabel',\r
+  'title',\r
+  'url',\r
+  'useJQuery'\r
+];\r
+// We have to keep track of the function/property names to avoid collisions for tag names which are used to allow the\r
+// following usage: 'client.apis.{tagName}'\r
+var reservedApiTags = [\r
+  'apis',\r
+  'asCurl',\r
+  'description',\r
+  'externalDocs',\r
+  'help',\r
+  'label',\r
+  'name',\r
+  'operation',\r
+  'operations',\r
+  'operationsArray',\r
+  'path',\r
+  'tag'\r
+];\r
+var supportedOperationMethods = ['delete', 'get', 'head', 'options', 'patch', 'post', 'put'];\r
+var SwaggerClient = module.exports = function (url, options) {\r
+  this.authorizations = null;\r
+  this.authorizationScheme = null;\r
+  this.basePath = null;\r
+  this.debug = false;\r
+  this.enableCookies = false;\r
+  this.info = null;\r
+  this.isBuilt = false;\r
+  this.isValid = false;\r
+  this.modelsArray = [];\r
+  this.resourceCount = 0;\r
+  this.url = null;\r
+  this.useJQuery = false;\r
+  this.swaggerObject = {};\r
+  this.deferredClient = undefined;\r
+\r
+  this.clientAuthorizations = new auth.SwaggerAuthorizations();\r
+\r
+  if (typeof url !== 'undefined') {\r
+    return this.initialize(url, options);\r
+  } else {\r
+    return this;\r
+  }\r
+};\r
+\r
+SwaggerClient.prototype.initialize = function (url, options) {\r
+  this.models = {};\r
+  this.sampleModels = {};\r
+\r
+  if (typeof url === 'string') {\r
+    this.url = url;\r
+  } else if (_.isObject(url)) {\r
+    options = url;\r
+    this.url = options.url;\r
+  }\r
+\r
+  options = options || {};\r
+  this.clientAuthorizations.add(options.authorizations);\r
+  this.swaggerRequestHeaders = options.swaggerRequestHeaders || 'application/json;charset=utf-8,*/*';\r
+  this.defaultSuccessCallback = options.defaultSuccessCallback || null;\r
+  this.defaultErrorCallback = options.defaultErrorCallback || null;\r
+  this.modelPropertyMacro = options.modelPropertyMacro || null;\r
+  this.parameterMacro = options.parameterMacro || null;\r
+  this.usePromise = options.usePromise || null;\r
+\r
+\r
+  if(this.usePromise) {\r
+    this.deferredClient = Q.defer();\r
+  }\r
+\r
+  if (typeof options.success === 'function') {\r
+    this.success = options.success;\r
+  }\r
+\r
+  if (options.useJQuery) {\r
+    this.useJQuery = options.useJQuery;\r
+  }\r
+\r
+  if (options.enableCookies) {\r
+    this.enableCookies = options.enableCookies;\r
+  }\r
+\r
+  this.options = options || {};\r
+\r
+  this.supportedSubmitMethods = options.supportedSubmitMethods || [];\r
+  this.failure = options.failure || function (err) { throw err; };\r
+  this.progress = options.progress || function () {};\r
+  this.spec = _.cloneDeep(options.spec); // Clone so we do not alter the provided document\r
+\r
+  if (options.scheme) {\r
+    this.scheme = options.scheme;\r
+  }\r
+\r
+  if (this.usePromise || typeof options.success === 'function') {\r
+    this.ready = true;\r
+    return this.build();\r
+  }\r
+};\r
+\r
+SwaggerClient.prototype.build = function (mock) {\r
+  if (this.isBuilt) {\r
+    return this;\r
+  }\r
+\r
+  var self = this;\r
+\r
+  this.progress('fetching resource list: ' + this.url + '; Please wait.');\r
+\r
+  var obj = {\r
+    useJQuery: this.useJQuery,\r
+    url: this.url,\r
+    method: 'get',\r
+    headers: {\r
+      accept: this.swaggerRequestHeaders\r
+    },\r
+    on: {\r
+      error: function (response) {\r
+        if (self.url.substring(0, 4) !== 'http') {\r
+          return self.fail('Please specify the protocol for ' + self.url);\r
+        } else if (response.status === 0) {\r
+          return self.fail('Can\'t read from server.  It may not have the appropriate access-control-origin settings.');\r
+        } else if (response.status === 404) {\r
+          return self.fail('Can\'t read swagger JSON from ' + self.url);\r
+        } else {\r
+          return self.fail(response.status + ' : ' + response.statusText + ' ' + self.url);\r
+        }\r
+      },\r
+      response: function (resp) {\r
+\r
+        var responseObj = resp.obj;\r
+        if(!responseObj) {\r
+          return self.fail('failed to parse JSON/YAML response');\r
+        }\r
+\r
+        self.swaggerVersion = responseObj.swaggerVersion;\r
+        self.swaggerObject = responseObj;\r
+\r
+        if (responseObj.swagger && parseInt(responseObj.swagger) === 2) {\r
+          self.swaggerVersion = responseObj.swagger;\r
+\r
+          new Resolver().resolve(responseObj, self.url, self.buildFromSpec, self);\r
+\r
+          self.isValid = true;\r
+        } else {\r
+          var converter = new SwaggerSpecConverter();\r
+          self.oldSwaggerObject = self.swaggerObject;\r
+\r
+          converter.setDocumentationLocation(self.url);\r
+          converter.convert(responseObj, self.clientAuthorizations, self.options, function(spec) {\r
+            self.swaggerObject = spec;\r
+            new Resolver().resolve(spec, self.url, self.buildFromSpec, self);\r
+            self.isValid = true;\r
+          });\r
+        }\r
+      }\r
+    }\r
+  };\r
+\r
+  if (this.spec) {\r
+    self.swaggerObject = this.spec;\r
+    setTimeout(function () {\r
+      new Resolver().resolve(self.spec, self.url, self.buildFromSpec, self);\r
+    }, 10);\r
+  } else {\r
+    this.clientAuthorizations.apply(obj);\r
+\r
+    if (mock) {\r
+      return obj;\r
+    }\r
+\r
+    new SwaggerHttp().execute(obj, this.options);\r
+  }\r
+\r
+  return (this.usePromise) ? this.deferredClient.promise : this;\r
+};\r
+\r
+SwaggerClient.prototype.buildFromSpec = function (response) {\r
+  if (this.isBuilt) {\r
+    return this;\r
+  }\r
+\r
+  this.apis = {};\r
+  this.apisArray = [];\r
+  this.basePath = response.basePath || '';\r
+  this.consumes = response.consumes;\r
+  this.host = response.host || '';\r
+  this.info = response.info || {};\r
+  this.produces = response.produces;\r
+  this.schemes = response.schemes || [];\r
+  this.securityDefinitions = response.securityDefinitions;\r
+  this.security = response.security;\r
+  this.title = response.title || '';\r
+\r
+  if (response.externalDocs) {\r
+    this.externalDocs = response.externalDocs;\r
+  }\r
+\r
+  // legacy support\r
+  this.authSchemes = response.securityDefinitions;\r
+\r
+  var definedTags = {};\r
+  var k;\r
+\r
+  if (Array.isArray(response.tags)) {\r
+    definedTags = {};\r
+\r
+    for (k = 0; k < response.tags.length; k++) {\r
+      var t = response.tags[k];\r
+      definedTags[t.name] = t;\r
+    }\r
+  }\r
+\r
+  var location;\r
+\r
+  if (typeof this.url === 'string') {\r
+    location = this.parseUri(this.url);\r
+    if (typeof this.scheme === 'undefined' && typeof this.schemes === 'undefined' || this.schemes.length === 0) {\r
+      this.scheme = location.scheme || 'http';\r
+    } else if (typeof this.scheme === 'undefined') {\r
+      this.scheme = this.schemes[0] || location.scheme;\r
+    }\r
+\r
+    if (typeof this.host === 'undefined' || this.host === '') {\r
+      this.host = location.host;\r
+\r
+      if (location.port) {\r
+        this.host = this.host + ':' + location.port;\r
+      }\r
+    }\r
+  }\r
+  else {\r
+    if (typeof this.schemes === 'undefined' || this.schemes.length === 0) {\r
+      this.scheme = 'http';\r
+    }\r
+    else if (typeof this.scheme === 'undefined') {\r
+      this.scheme = this.schemes[0];\r
+    }\r
+  }\r
+\r
+  this.definitions = response.definitions;\r
+\r
+  var key;\r
+\r
+  for (key in this.definitions) {\r
+    var model = new Model(key, this.definitions[key], this.models, this.modelPropertyMacro);\r
+\r
+    if (model) {\r
+      this.models[key] = model;\r
+    }\r
+  }\r
+\r
+  // get paths, create functions for each operationId\r
+  var self = this;\r
+\r
+  // Bind help to 'client.apis'\r
+  self.apis.help = _.bind(self.help, self);\r
+\r
+  _.forEach(response.paths, function (pathObj, path) {\r
+    // Only process a path if it's an object\r
+    if (!_.isPlainObject(pathObj)) {\r
+      return;\r
+    }\r
+\r
+    _.forEach(supportedOperationMethods, function (method) {\r
+      var operation = pathObj[method];\r
+\r
+      if (_.isUndefined(operation)) {\r
+        // Operation does not exist\r
+        return;\r
+      } else if (!_.isPlainObject(operation)) {\r
+        // Operation exists but it is not an Operation Object.  Since this is invalid, log it.\r
+        helpers.log('The \'' + method + '\' operation for \'' + path + '\' path is not an Operation Object');\r
+\r
+        return;\r
+      }\r
+\r
+      var tags = operation.tags;\r
+\r
+      if (_.isUndefined(tags) || !_.isArray(tags) || tags.length === 0) {\r
+        tags = operation.tags = [ 'default' ];\r
+      }\r
+\r
+      var operationId = self.idFromOp(path, method, operation);\r
+\r
+      var operationObject = new Operation(self,\r
+        operation.scheme,\r
+        operationId,\r
+        method,\r
+        path,\r
+        operation,\r
+        self.definitions,\r
+        self.models,\r
+        self.clientAuthorizations);\r
+\r
+      // bind self operation's execute command to the api\r
+      _.forEach(tags, function (tag) {\r
+        var clientProperty = _.indexOf(reservedClientTags, tag) > -1 ? '_' + tag : tag;\r
+        var apiProperty = _.indexOf(reservedApiTags, tag) > -1 ? '_' + tag : tag;\r
+        var operationGroup = self[clientProperty];\r
+\r
+        if (clientProperty !== tag) {\r
+          helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient function/property name.  Use \'client.' +\r
+                      clientProperty + '\' or \'client.apis.' + tag + '\' instead of \'client.' + tag + '\'.');\r
+        }\r
+\r
+        if (apiProperty !== tag) {\r
+          helpers.log('The \'' + tag + '\' tag conflicts with a SwaggerClient operation function/property name.  Use ' +\r
+                      '\'client.apis.' + apiProperty + '\' instead of \'client.apis.' + tag + '\'.');\r
+        }\r
+\r
+        if (_.indexOf(reservedApiTags, operationId) > -1) {\r
+          helpers.log('The \'' + operationId + '\' operationId conflicts with a SwaggerClient operation ' +\r
+                      'function/property name.  Use \'client.apis.' + apiProperty + '._' + operationId +\r
+                      '\' instead of \'client.apis.' + apiProperty + '.' + operationId + '\'.');\r
+\r
+          operationId = '_' + operationId;\r
+          operationObject.nickname = operationId; // So 'client.apis.[tag].operationId.help() works properly\r
+        }\r
+\r
+        if (_.isUndefined(operationGroup)) {\r
+          operationGroup = self[clientProperty] = self.apis[apiProperty] = {};\r
+\r
+          operationGroup.operations = {};\r
+          operationGroup.label = apiProperty;\r
+          operationGroup.apis = {};\r
+\r
+          var tagDef = definedTags[tag];\r
+\r
+          if (!_.isUndefined(tagDef)) {\r
+            operationGroup.description = tagDef.description;\r
+            operationGroup.externalDocs = tagDef.externalDocs;\r
+          }\r
+\r
+          self[clientProperty].help = _.bind(self.help, operationGroup);\r
+          self.apisArray.push(new OperationGroup(tag, operationGroup.description, operationGroup.externalDocs, operationObject));\r
+        }\r
+\r
+        operationId = self.makeUniqueOperationId(operationId, self.apis[apiProperty]);\r
+\r
+        // Bind tag help\r
+        if (!_.isFunction(operationGroup.help)) {\r
+          operationGroup.help = _.bind(self.help, operationGroup);\r
+        }\r
+\r
+        // bind to the apis object\r
+        self.apis[apiProperty][operationId] = operationGroup[operationId] = _.bind(operationObject.execute,\r
+                                                                                  operationObject);\r
+        self.apis[apiProperty][operationId].help = operationGroup[operationId].help = _.bind(operationObject.help,\r
+                                                                                             operationObject);\r
+        self.apis[apiProperty][operationId].asCurl = operationGroup[operationId].asCurl = _.bind(operationObject.asCurl,\r
+                                                                                                 operationObject);\r
+\r
+        operationGroup.apis[operationId] = operationGroup.operations[operationId] = operationObject;\r
+\r
+        // legacy UI feature\r
+        var api = _.find(self.apisArray, function (api) {\r
+          return api.tag === tag;\r
+        });\r
+\r
+        if (api) {\r
+          api.operationsArray.push(operationObject);\r
+        }\r
+      });\r
+    });\r
+  });\r
+\r
+  // sort the apisArray according to the tags\r
+  var sortedApis = [];\r
+  _.forEach(Object.keys(definedTags), function (tag) {\r
+    var _apiToAdd;\r
+    var pos;\r
+    for(pos in self.apisArray) {\r
+      var _api = self.apisArray[pos];\r
+      if(_api && tag === _api.name) {\r
+        sortedApis.push(_api);\r
+        self.apisArray[pos] = null;\r
+      }\r
+    }\r
+  });\r
+  // add anything left\r
+  _.forEach(self.apisArray, function (api) {\r
+    if(api) {\r
+      sortedApis.push(api);\r
+    }\r
+  });\r
+  self.apisArray = sortedApis;\r
+\r
+  _.forEach(response.definitions, function (definitionObj, definition) {\r
+    definitionObj['id'] = definition.toLowerCase();\r
+    definitionObj['name'] = definition;\r
+    self.modelsArray.push(definitionObj);\r
+  });\r
+\r
+  this.isBuilt = true;\r
+\r
+  if (this.usePromise) {\r
+    this.isValid = true;\r
+    this.isBuilt = true;\r
+    this.deferredClient.resolve(this);\r
+\r
+    return this.deferredClient.promise;\r
+  }\r
+\r
+  if (this.success) {\r
+    this.success();\r
+  }\r
+\r
+  return this;\r
+};\r
+\r
+SwaggerClient.prototype.makeUniqueOperationId = function(operationId, api) {\r
+  var count = 0;\r
+  var name = operationId;\r
+\r
+  // make unique across this operation group\r
+  while(true) {\r
+    var matched = false;\r
+    _.forEach(api.operations, function (operation) {\r
+      if(operation.nickname === name) {\r
+        matched = true;\r
+      }\r
+    });\r
+    if(!matched) {\r
+      return name;\r
+    }\r
+    name = operationId + '_' + count;\r
+    count ++;\r
+  }\r
+\r
+  return operationId;\r
+};\r
+\r
+SwaggerClient.prototype.parseUri = function (uri) {\r
+  var urlParseRE = /^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/;\r
+  var parts = urlParseRE.exec(uri);\r
+\r
+  return {\r
+    scheme: parts[4] ? parts[4].replace(':','') : undefined,\r
+    host: parts[11],\r
+    port: parts[12],\r
+    path: parts[15]\r
+  };\r
+};\r
+\r
+SwaggerClient.prototype.help = function (dontPrint) {\r
+  var output = '';\r
+\r
+  if (this instanceof SwaggerClient) {\r
+    _.forEach(this.apis, function (api, name) {\r
+      if (_.isPlainObject(api)) {\r
+        output += 'operations for the \'' + name + '\' tag\n';\r
+\r
+        _.forEach(api.operations, function (operation, name) {\r
+          output += '  * ' + name + ': ' + operation.summary + '\n';\r
+        });\r
+      }\r
+    });\r
+  } else if (this instanceof OperationGroup || _.isPlainObject(this)) {\r
+    output += 'operations for the \'' + this.label + '\' tag\n';\r
+\r
+    _.forEach(this.apis, function (operation, name) {\r
+      output += '  * ' + name + ': ' + operation.summary + '\n';\r
+    });\r
+  }\r
+\r
+  if (dontPrint) {\r
+    return output;\r
+  } else {\r
+    helpers.log(output);\r
+\r
+    return output;\r
+  }\r
+};\r
+\r
+SwaggerClient.prototype.tagFromLabel = function (label) {\r
+  return label;\r
+};\r
+\r
+SwaggerClient.prototype.idFromOp = function (path, httpMethod, op) {\r
+  if(!op || !op.operationId) {\r
+    op = op || {};\r
+    op.operationId = httpMethod + '_' + path;\r
+  }\r
+  var opId = op.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g, '_') || (path.substring(1) + '_' + httpMethod);\r
+\r
+  opId = opId.replace(/((_){2,})/g, '_');\r
+  opId = opId.replace(/^(_)*/g, '');\r
+  opId = opId.replace(/([_])*$/g, '');\r
+\r
+  return opId;\r
+};\r
+\r
+SwaggerClient.prototype.setHost = function (host) {\r
+  this.host = host;\r
+\r
+  if(this.apis) {\r
+    _.forEach(this.apis, function(api) {\r
+      if(api.operations) {\r
+        _.forEach(api.operations, function(operation) {\r
+          operation.host = host;\r
+        });\r
+      }\r
+    });\r
+  }\r
+};\r
+\r
+SwaggerClient.prototype.setBasePath = function (basePath) {\r
+  this.basePath = basePath;\r
+\r
+  if(this.apis) {\r
+    _.forEach(this.apis, function(api) {\r
+      if(api.operations) {\r
+        _.forEach(api.operations, function(operation) {\r
+          operation.basePath = basePath;\r
+        });\r
+      }\r
+    });\r
+  }\r
+};\r
+\r
+SwaggerClient.prototype.setSchemes = function (schemes) {\r
+  this.schemes = schemes;\r
+\r
+  if(schemes && schemes.length > 0) {\r
+    if(this.apis) {\r
+      _.forEach(this.apis, function (api) {\r
+        if (api.operations) {\r
+          _.forEach(api.operations, function (operation) {\r
+            operation.scheme = schemes[0];\r
+          });\r
+        }\r
+      });\r
+    }\r
+  }\r
+};\r
+\r
+\r
+SwaggerClient.prototype.fail = function (message) {\r
+  if (this.usePromise) {\r
+    this.deferredClient.reject(message);\r
+    return this.deferredClient.promise;\r
+  } else {\r
+    if (this.failure) {\r
+      this.failure(message);\r
+    }\r
+    else {\r
+      this.failure(message);\r
+    }\r
+  }\r
+};\r
+\r
+},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":51,"lodash-compat/collection/find":55,"lodash-compat/collection/forEach":56,"lodash-compat/function/bind":60,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isFunction":144,"lodash-compat/lang/isObject":146,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isUndefined":150,"q":159}],4:[function(require,module,exports){\r
+(function (process){\r
+'use strict';\r
+\r
+var _ = {\r
+  isPlainObject: require('lodash-compat/lang/isPlainObject'),\r
+  indexOf: require('lodash-compat/array/indexOf')\r
+};\r
+\r
+module.exports.__bind = function (fn, me) {\r
+  return function(){\r
+    return fn.apply(me, arguments);\r
+  };\r
+};\r
+\r
+var log = module.exports.log = function() {\r
+  // Only log if available and we're not testing\r
+  if (console && process.env.NODE_ENV !== 'test') {\r
+    console.log(Array.prototype.slice.call(arguments)[0]);\r
+  }\r
+};\r
+\r
+module.exports.fail = function (message) {\r
+  log(message);\r
+};\r
+\r
+var optionHtml = module.exports.optionHtml = function (label, value) {\r
+  return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';\r
+};\r
+\r
+var resolveSchema = module.exports.resolveSchema = function (schema) {\r
+  if (_.isPlainObject(schema.schema)) {\r
+    schema = resolveSchema(schema.schema);\r
+  }\r
+\r
+  return schema;\r
+};\r
+\r
+var simpleRef = module.exports.simpleRef = function (name) {\r
+  if (typeof name === 'undefined') {\r
+    return null;\r
+  }\r
+\r
+  if (name.indexOf('#/definitions/') === 0) {\r
+    return name.substring('#/definitions/'.length);\r
+  } else {\r
+    return name;\r
+  }\r
+};\r
+\r
+\r
+}).call(this,require('_process'))\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiJ3VzZSBzdHJpY3QnO1xuXG52YXIgXyA9IHtcbiAgaXNQbGFpbk9iamVjdDogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9sYW5nL2lzUGxhaW5PYmplY3QnKSxcbiAgaW5kZXhPZjogcmVxdWlyZSgnbG9kYXNoLWNvbXBhdC9hcnJheS9pbmRleE9mJylcbn07XG5cbm1vZHVsZS5leHBvcnRzLl9fYmluZCA9IGZ1bmN0aW9uICh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AndW5kZWZpbmVkJykge1xuICAgIHJldHVybiBudWxsO1xuICB9XG5cbiAgaWYgKG5hbWUuaW5kZXhPZignIy9kZWZpbml0aW9ucy8nKSA9PT0gMCkge1xuICAgIHJldHVybiBuYW1lLnN1YnN0cmluZygnIy9kZWZpbml0aW9ucy8nLmxlbmd0aCk7XG4gIH0gZWxzZSB7XG4gICAgcmV0dXJuIG5hbWU7XG4gIH1cbn07XG5cbiJdfQ==\r
+},{"_process":13,"lodash-compat/array/indexOf":51,"lodash-compat/lang/isPlainObject":147}],5:[function(require,module,exports){\r
+'use strict';\r
+\r
+var helpers = require('./helpers');\r
+var request = require('superagent');\r
+var jsyaml = require('js-yaml');\r
+var _ = {\r
+  isObject: require('lodash-compat/lang/isObject')\r
+};\r
+\r
+/*\r
+ * JQueryHttpClient is a light-weight, node or browser HTTP client\r
+ */\r
+var JQueryHttpClient = function () {\r
+  this.type = 'JQueryHttpClient';\r
+};\r
+\r
+/*\r
+ * SuperagentHttpClient is a light-weight, node or browser HTTP client\r
+ */\r
+var SuperagentHttpClient = function () {\r
+  this.type = 'SuperagentHttpClient';\r
+};\r
+\r
+/**\r
+ * SwaggerHttp is a wrapper for executing requests\r
+ */\r
+var SwaggerHttp = module.exports = function () {};\r
+\r
+SwaggerHttp.prototype.execute = function (obj, opts) {\r
+  var client;\r
+\r
+  if(opts && opts.client) {\r
+    client = opts.client;\r
+  }\r
+  else {\r
+    client = new SuperagentHttpClient(opts);\r
+  }\r
+  client.opts = opts || {};\r
+\r
+  // legacy support\r
+  var hasJQuery = false;\r
+  if(typeof window !== 'undefined') {\r
+    if(typeof window.jQuery !== 'undefined') {\r
+      hasJQuery = true;\r
+    }\r
+  }\r
+  // OPTIONS support\r
+  if(obj.method.toLowerCase() === 'options' && client.type === 'SuperagentHttpClient') {\r
+    log('forcing jQuery as OPTIONS are not supported by SuperAgent');\r
+    obj.useJQuery = true;\r
+  }\r
+  if(this.isInternetExplorer() && (obj.useJQuery === false || !hasJQuery )) {\r
+    throw new Error('Unsupported configuration! JQuery is required but not available');\r
+  }\r
+  if ((obj && obj.useJQuery === true) || this.isInternetExplorer() && hasJQuery) {\r
+    client = new JQueryHttpClient(opts);\r
+  }\r
+\r
+  var success = obj.on.response;\r
+\r
+  var requestInterceptor = function(data) {\r
+    if(opts && opts.requestInterceptor) {\r
+      data = opts.requestInterceptor.apply(data);\r
+    }\r
+    return data;\r
+  };\r
+\r
+  var responseInterceptor = function(data) {\r
+    if(opts && opts.responseInterceptor) {\r
+      data = opts.responseInterceptor.apply(data);\r
+    }\r
+    return success(data);\r
+  };\r
+\r
+  obj.on.response = function(data) {\r
+    responseInterceptor(data);\r
+  };\r
+\r
+  if (_.isObject(obj) && _.isObject(obj.body)) {\r
+    // special processing for file uploads via jquery\r
+    if (obj.body.type && obj.body.type === 'formData'){\r
+      obj.contentType = false;\r
+      obj.processData = false;\r
+\r
+      delete obj.headers['Content-Type'];\r
+    } else {\r
+      obj.body = JSON.stringify(obj.body);\r
+    }\r
+  }\r
+\r
+  obj = requestInterceptor(obj) || obj;\r
+  if (obj.beforeSend) {\r
+    obj.beforeSend(function(_obj) {\r
+      client.execute(_obj || obj);\r
+    });\r
+  } else {\r
+    client.execute(obj);\r
+  }\r
+\r
+  return (obj.deferred) ? obj.deferred.promise : obj;\r
+};\r
+\r
+SwaggerHttp.prototype.isInternetExplorer = function () {\r
+  var detectedIE = false;\r
+\r
+  if (typeof navigator !== 'undefined' && navigator.userAgent) {\r
+    var nav = navigator.userAgent.toLowerCase();\r
+\r
+    if (nav.indexOf('msie') !== -1) {\r
+      var version = parseInt(nav.split('msie')[1]);\r
+\r
+      if (version <= 8) {\r
+        detectedIE = true;\r
+      }\r
+    }\r
+  }\r
+\r
+  return detectedIE;\r
+};\r
+\r
+JQueryHttpClient.prototype.execute = function (obj) {\r
+  var jq = this.jQuery || (typeof window !== 'undefined' && window.jQuery);\r
+  var cb = obj.on;\r
+  var request = obj;\r
+\r
+  if(typeof jq === 'undefined' || jq === false) {\r
+    throw new Error('Unsupported configuration! JQuery is required but not available');\r
+  }\r
+\r
+  obj.type = obj.method;\r
+  obj.cache = false;\r
+  obj.data = obj.body;\r
+  delete obj.useJQuery;\r
+  delete obj.body;\r
+\r
+  obj.complete = function (response) {\r
+    var headers = {};\r
+    var headerArray = response.getAllResponseHeaders().split('\n');\r
+\r
+    for (var i = 0; i < headerArray.length; i++) {\r
+      var toSplit = headerArray[i].trim();\r
+\r
+      if (toSplit.length === 0) {\r
+        continue;\r
+      }\r
+\r
+      var separator = toSplit.indexOf(':');\r
+\r
+      if (separator === -1) {\r
+        // Name but no value in the header\r
+        headers[toSplit] = null;\r
+\r
+        continue;\r
+      }\r
+\r
+      var name = toSplit.substring(0, separator).trim();\r
+      var value = toSplit.substring(separator + 1).trim();\r
+\r
+      headers[name] = value;\r
+    }\r
+\r
+    var out = {\r
+      url: request.url,\r
+      method: request.method,\r
+      status: response.status,\r
+      statusText: response.statusText,\r
+      data: response.responseText,\r
+      headers: headers\r
+    };\r
+\r
+    try {\r
+      var possibleObj =  response.responseJSON || jsyaml.safeLoad(response.responseText);\r
+      out.obj = (typeof possibleObj === 'string') ? {} : possibleObj;\r
+    } catch (ex) {\r
+      // do not set out.obj\r
+      helpers.log('unable to parse JSON/YAML content');\r
+    }\r
+\r
+    // I can throw, or parse null?\r
+    out.obj = out.obj || null;\r
+\r
+    if (response.status >= 200 && response.status < 300) {\r
+      cb.response(out);\r
+    } else if (response.status === 0 || (response.status >= 400 && response.status < 599)) {\r
+      cb.error(out);\r
+    } else {\r
+      return cb.response(out);\r
+    }\r
+  };\r
+\r
+  jq.support.cors = true;\r
+\r
+  return jq.ajax(obj);\r
+};\r
+\r
+SuperagentHttpClient.prototype.execute = function (obj) {\r
+  var method = obj.method.toLowerCase();\r
+\r
+  if (method === 'delete') {\r
+    method = 'del';\r
+  }\r
+  var headers = obj.headers || {};\r
+  var r = request[method](obj.url);\r
+  var name;\r
+  for (name in headers) {\r
+    r.set(name, headers[name]);\r
+  }\r
+\r
+  if (obj.enableCookies) {\r
+    r.withCredentials();\r
+  }\r
+\r
+  if (obj.body) {\r
+    r.send(obj.body);\r
+  }\r
+\r
+  if(typeof r.buffer === 'function') {\r
+    r.buffer(); // force superagent to populate res.text with the raw response data\r
+  }\r
+\r
+  r.end(function (err, res) {\r
+    res = res || {\r
+      status: 0,\r
+      headers: {error: 'no response from server'}\r
+    };\r
+    var response = {\r
+      url: obj.url,\r
+      method: obj.method,\r
+      headers: res.headers\r
+    };\r
+    var cb;\r
+\r
+    if (!err && res.error) {\r
+      err = res.error;\r
+    }\r
+\r
+    if (err && obj.on && obj.on.error) {\r
+      response.errObj = err;\r
+      response.status = res ? res.status : 500;\r
+      response.statusText = res ? res.text : err.message;\r
+      if(res.headers && res.headers['content-type']) {\r
+        if(res.headers['content-type'].indexOf('application/json') >= 0) {\r
+          try {\r
+            response.obj = JSON.parse(response.statusText);\r
+          }\r
+          catch (e) {\r
+            response.obj = null;\r
+          }\r
+        }\r
+      }\r
+      cb = obj.on.error;\r
+    } else if (res && obj.on && obj.on.response) {\r
+      var possibleObj;\r
+\r
+      // Already parsed by by superagent?\r
+      if(res.body && Object.keys(res.body).length > 0) {\r
+        possibleObj = res.body;\r
+      } else {\r
+          try {\r
+            possibleObj = jsyaml.safeLoad(res.text);\r
+            // can parse into a string... which we don't need running around in the system\r
+            possibleObj = (typeof possibleObj === 'string') ? null : possibleObj;\r
+          } catch(e) {\r
+            helpers.log('cannot parse JSON/YAML content');\r
+          }\r
+      }\r
+\r
+      // null means we can't parse into object\r
+      response.obj = (typeof possibleObj === 'object') ? possibleObj : null;\r
+\r
+      response.status = res.status;\r
+      response.statusText = res.text;\r
+      cb = obj.on.response;\r
+    }\r
+    response.data = response.statusText;\r
+\r
+    if (cb) {\r
+      cb(response);\r
+    }\r
+  });\r
+};\r
+\r
+},{"./helpers":4,"js-yaml":21,"lodash-compat/lang/isObject":146,"superagent":161}],6:[function(require,module,exports){\r
+'use strict';\r
+\r
+var SwaggerHttp = require('./http');\r
+var _ = {\r
+  isObject: require('lodash-compat/lang/isObject'),\r
+  cloneDeep: require('lodash-compat/lang/cloneDeep'),\r
+  isArray: require('lodash-compat/lang/isArray')\r
+};\r
+\r
+\r
+/**\r
+ * Resolves a spec's remote references\r
+ */\r
+var Resolver = module.exports = function () {\r
+  this.failedUrls = [];\r
+};\r
+\r
+Resolver.prototype.processAllOf = function(root, name, definition, resolutionTable, unresolvedRefs, spec) {\r
+  var i, location, property;\r
+\r
+  definition['x-resolved-from'] = [ '#/definitions/' + name ];\r
+  var allOf = definition.allOf;\r
+  // the refs go first\r
+  allOf.sort(function(a, b) {\r
+    if(a.$ref && b.$ref) { return 0; }\r
+    else if(a.$ref) { return -1; }\r
+    else { return 1; }\r
+  });\r
+  for (i = 0; i < allOf.length; i++) {\r
+    property = allOf[i];\r
+    location = '/definitions/' + name + '/allOf';\r
+    this.resolveInline(root, spec, property, resolutionTable, unresolvedRefs, location);\r
+  }\r
+};\r
+\r
+Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {\r
+  this.spec = spec;\r
+  var root = arg1, callback = arg2, scope = arg3, opts = {}, location, i;\r
+  if(typeof arg1 === 'function') {\r
+    root = null;\r
+    callback = arg1;\r
+    scope = arg2;\r
+  }\r
+  var _root = root;\r
+  this.scope = (scope || this);\r
+  this.iteration = this.iteration || 0;\r
+\r
+  if(this.scope.options && this.scope.options.requestInterceptor){\r
+    opts.requestInterceptor = this.scope.options.requestInterceptor;\r
+  }\r
+\r
+  if(this.scope.options && this.scope.options.responseInterceptor){\r
+    opts.responseInterceptor = this.scope.options.responseInterceptor;\r
+  }\r
+\r
+  var name, path, property, propertyName;\r
+  var processedCalls = 0, resolvedRefs = {}, unresolvedRefs = {};\r
+  var resolutionTable = []; // store objects for dereferencing\r
+\r
+  spec.definitions = spec.definitions || {};\r
+  // definitions\r
+  for (name in spec.definitions) {\r
+    var definition = spec.definitions[name];\r
+    if(definition['$ref']) {\r
+      this.resolveInline(root, spec, definition, resolutionTable, unresolvedRefs, definition);\r
+    }\r
+    else {\r
+      for (propertyName in definition.properties) {\r
+        property = definition.properties[propertyName];\r
+        if (_.isArray(property.allOf)) {\r
+          this.processAllOf(root, name, property, resolutionTable, unresolvedRefs, spec);\r
+        }\r
+        else {\r
+          this.resolveTo(root, property, resolutionTable, '/definitions');\r
+        }\r
+      }\r
+\r
+      if (definition.allOf) {\r
+        this.processAllOf(root, name, definition, resolutionTable, unresolvedRefs, spec);\r
+      }\r
+    }\r
+  }\r
+\r
+  // shared parameters\r
+  spec.parameters = spec.parameters || {};\r
+  for(name in spec.parameters) {\r
+    var parameter = spec.parameters[name];\r
+    if (parameter.in === 'body' && parameter.schema) {\r
+      if(_.isArray(parameter.schema.allOf)) {\r
+        // move to a definition\r
+        var modelName = 'inline_model';\r
+        var name = modelName;\r
+        var done = false; var counter = 0;\r
+        while(!done) {\r
+          if(typeof spec.definitions[name] === 'undefined') {\r
+            done = true;\r
+            break;\r
+          }\r
+          name = modelName + '_' + counter;\r
+          counter ++;\r
+        }\r
+        spec.definitions[name] = { allOf: parameter.schema.allOf };\r
+        delete parameter.schema.allOf;\r
+        parameter.schema.$ref = '#/definitions/' + name;\r
+        this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec);\r
+      }\r
+      else {\r
+        this.resolveTo(root, parameter.schema, resolutionTable, location);\r
+      }\r
+    }\r
+\r
+    if (parameter.$ref) {\r
+      // parameter reference\r
+      this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref);\r
+    }\r
+  }\r
+\r
+  // operations\r
+  for (name in spec.paths) {\r
+    var method, operation, responseCode;\r
+    path = spec.paths[name];\r
+\r
+    for (method in path) {\r
+      // operation reference\r
+      if(method === '$ref') {\r
+        // location = path[method];\r
+        location = '/paths' + name;\r
+        this.resolveInline(root, spec, path, resolutionTable, unresolvedRefs, location);\r
+      }\r
+      else {\r
+        operation = path[method];\r
+        var sharedParameters = path.parameters || [];\r
+        var parameters = operation.parameters || [];\r
+\r
+        for (i in sharedParameters) {\r
+          var parameter = sharedParameters[i];\r
+          parameters.unshift(parameter);\r
+        }\r
+        if(method !== 'parameters' && _.isObject(operation)) {\r
+          operation.parameters = operation.parameters || parameters;\r
+        }\r
+\r
+        for (i in parameters) {\r
+          var parameter = parameters[i];\r
+          location = '/paths' + name + '/' + method + '/parameters';\r
+\r
+          if (parameter.in === 'body' && parameter.schema) {\r
+            if(_.isArray(parameter.schema.allOf)) {\r
+              // move to a definition\r
+              var modelName = 'inline_model';\r
+              var name = modelName;\r
+              var done = false; var counter = 0;\r
+              while(!done) {\r
+                if(typeof spec.definitions[name] === 'undefined') {\r
+                  done = true;\r
+                  break;\r
+                }\r
+                name = modelName + '_' + counter;\r
+                counter ++;\r
+              }\r
+              spec.definitions[name] = { allOf: parameter.schema.allOf };\r
+              delete parameter.schema.allOf;\r
+              parameter.schema.$ref = '#/definitions/' + name;\r
+              this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec);\r
+            }\r
+            else {\r
+              this.resolveTo(root, parameter.schema, resolutionTable, location);\r
+            }\r
+          }\r
+\r
+          if (parameter.$ref) {\r
+            // parameter reference\r
+            this.resolveInline(root, spec, parameter, resolutionTable, unresolvedRefs, parameter.$ref);\r
+          }\r
+        }\r
+\r
+        for (responseCode in operation.responses) {\r
+          var response = operation.responses[responseCode];\r
+          location = '/paths' + name + '/' + method + '/responses/' + responseCode;\r
+\r
+          if(_.isObject(response)) {\r
+            if(response.$ref) {\r
+              // response reference\r
+              this.resolveInline(root, spec, response, resolutionTable, unresolvedRefs, location);\r
+            }\r
+            if (response.schema) {\r
+              var responseObj = response;\r
+              if(_.isArray(responseObj.schema.allOf)) {\r
+                // move to a definition\r
+                var modelName = 'inline_model';\r
+                var name = modelName;\r
+                var done = false; var counter = 0;\r
+                while(!done) {\r
+                  if(typeof spec.definitions[name] === 'undefined') {\r
+                    done = true;\r
+                    break;\r
+                  }\r
+                  name = modelName + '_' + counter;\r
+                  counter ++;\r
+                }\r
+                spec.definitions[name] = { allOf: responseObj.schema.allOf };\r
+                delete responseObj.schema.allOf;\r
+                delete responseObj.schema.type;\r
+                responseObj.schema.$ref = '#/definitions/' + name;\r
+                this.processAllOf(root, name, spec.definitions[name], resolutionTable, unresolvedRefs, spec);\r
+              }\r
+              else if('array' === responseObj.schema.type) {\r
+                if(responseObj.schema.items && responseObj.schema.items.$ref) {\r
+                  // response reference\r
+                  this.resolveInline(root, spec, responseObj.schema.items, resolutionTable, unresolvedRefs, location);\r
+                }\r
+              }\r
+              else {\r
+                this.resolveTo(root, response.schema, resolutionTable, location);\r
+              }\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+    // clear them out to avoid multiple resolutions\r
+    path.parameters = [];\r
+  }\r
+\r
+  var expectedCalls = 0, toResolve = [];\r
+  // if the root is same as obj[i].root we can resolve locally\r
+  var all = resolutionTable;\r
+\r
+  var parts;\r
+  for(i = 0; i < all.length; i++) {\r
+    var a = all[i];\r
+    if(root === a.root) {\r
+      if(a.resolveAs === 'ref') {\r
+        // resolve any path walking\r
+        var joined = ((a.root || '') + '/' + a.key).split('/');\r
+        var normalized = [];\r
+        var url = '';\r
+        var k;\r
+\r
+        if(a.key.indexOf('../') >= 0) {\r
+          for(var j = 0; j < joined.length; j++) {\r
+            if(joined[j] === '..') {\r
+              normalized = normalized.slice(0, normalized.length-1);\r
+            }\r
+            else {\r
+              normalized.push(joined[j]);\r
+            }\r
+          }\r
+          for(k = 0; k < normalized.length; k ++) {\r
+            if(k > 0) {\r
+              url += '/';\r
+            }\r
+            url += normalized[k];\r
+          }\r
+          // we now have to remote resolve this because the path has changed\r
+          a.root = url;\r
+          toResolve.push(a);\r
+        }\r
+        else {\r
+          parts = a.key.split('#');\r
+          if(parts.length === 2) {\r
+            if(parts[0].indexOf('http://') === 0 || parts[0].indexOf('https://') === 0) {\r
+              a.root = parts[0];\r
+            }\r
+            location = parts[1].split('/');\r
+            var r;\r
+            var s = spec;\r
+            for(k = 0; k < location.length; k++) {\r
+              var part = location[k];\r
+              if(part !== '') {\r
+                s = s[part];\r
+                if(typeof s !== 'undefined') {\r
+                  r = s;\r
+                }\r
+                else {\r
+                  r = null;\r
+                  break;\r
+                }\r
+              }\r
+            }\r
+            if(r === null) {\r
+              // must resolve this too\r
+              toResolve.push(a);\r
+            }\r
+          }\r
+        }\r
+      }\r
+      else {\r
+        if (a.resolveAs === 'inline') {\r
+          if(a.key && a.key.indexOf('#') === -1 && a.key.charAt(0) !== '/') {\r
+            // handle relative schema\r
+            parts = a.root.split('/');\r
+            location = '';\r
+            for(i = 0; i < parts.length - 1; i++) {\r
+              location += parts[i] + '/';\r
+            }\r
+            location += a.key;\r
+            a.root = location;\r
+            a.location = '';\r
+          }\r
+          toResolve.push(a);\r
+        }\r
+      }\r
+    }\r
+    else {\r
+      toResolve.push(a);\r
+    }\r
+  }\r
+  expectedCalls = toResolve.length;\r
+\r
+  // resolve anything that is local\r
+  for(var ii = 0; ii < toResolve.length; ii++) {\r
+    (function(item, spec, self) {\r
+      // NOTE: this used to be item.root === null, but I (@ponelat) have added a guard against .split, which means item.root can be ''\r
+      if(!item.root || item.root === root) {\r
+        // local resolve\r
+        self.resolveItem(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, item);\r
+        processedCalls += 1;\r
+\r
+        if(processedCalls === expectedCalls) {\r
+          self.finish(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, true);\r
+        }\r
+      }\r
+      else if(self.failedUrls.indexOf(item.root) === -1) {\r
+        var obj = {\r
+          useJQuery: false,  // TODO\r
+          url: item.root,\r
+          method: 'get',\r
+          headers: {\r
+            accept: self.scope.swaggerRequestHeaders || 'application/json'\r
+          },\r
+          on: {\r
+            error: function (error) {\r
+              processedCalls += 1;\r
+              console.log('failed url: ' + obj.url);\r
+              self.failedUrls.push(obj.url);\r
+              unresolvedRefs[item.key] = {\r
+                root: item.root,\r
+                location: item.location\r
+              };\r
+\r
+              if (processedCalls === expectedCalls) {\r
+                self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback);\r
+              }\r
+            },  // jshint ignore:line\r
+            response: function (response) {\r
+              var swagger = response.obj;\r
+              self.resolveItem(swagger, item.root, resolutionTable, resolvedRefs, unresolvedRefs, item);\r
+              processedCalls += 1;\r
+\r
+              if (processedCalls === expectedCalls) {\r
+                self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback);\r
+              }\r
+            }\r
+          } // jshint ignore:line\r
+        };\r
+\r
+        if (scope && scope.clientAuthorizations) {\r
+          scope.clientAuthorizations.apply(obj);\r
+        }\r
+\r
+        new SwaggerHttp().execute(obj, opts);\r
+      }\r
+      else {\r
+        processedCalls += 1;\r
+        unresolvedRefs[item.key] = {\r
+          root: item.root,\r
+          location: item.location\r
+        };\r
+        if (processedCalls === expectedCalls) {\r
+          self.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback);\r
+        }\r
+      }\r
+    }(toResolve[ii], spec, this));\r
+  }\r
+\r
+  if (Object.keys(toResolve).length === 0) {\r
+    this.finish(spec, _root, resolutionTable, resolvedRefs, unresolvedRefs, callback);\r
+  }\r
+};\r
+\r
+Resolver.prototype.resolveItem = function(spec, root, resolutionTable, resolvedRefs, unresolvedRefs, item) {\r
+  var path = item.location;\r
+  var location = spec, parts = path.split('/');\r
+  if(path !== '') {\r
+    for (var j = 0; j < parts.length; j++) {\r
+      var segment = parts[j];\r
+      if (segment.indexOf('~1') !== -1) {\r
+        segment = parts[j].replace(/~0/g, '~').replace(/~1/g, '/');\r
+        if (segment.charAt(0) !== '/') {\r
+          segment = '/' + segment;\r
+        }\r
+      }\r
+      if (typeof location === 'undefined' || location === null) {\r
+        break;\r
+      }\r
+      if (segment === '' && j === (parts.length - 1) && parts.length > 1) {\r
+        location = null;\r
+        break;\r
+      }\r
+      if (segment.length > 0) {\r
+        location = location[segment];\r
+      }\r
+    }\r
+  }\r
+  var resolved = item.key;\r
+  parts = item.key.split('/');\r
+  var resolvedName = parts[parts.length-1];\r
+\r
+  if(resolvedName.indexOf('#') >= 0) {\r
+    resolvedName = resolvedName.split('#')[1];\r
+  }\r
+\r
+  if (location !== null && typeof location !== 'undefined') {\r
+    resolvedRefs[resolved] = {\r
+      name: resolvedName,\r
+      obj: location,\r
+      key: item.key,\r
+      root: item.root\r
+    };\r
+  } else {\r
+    unresolvedRefs[resolved] = {\r
+      root: item.root,\r
+      location: item.location\r
+    };\r
+  }\r
+};\r
+\r
+Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs, unresolvedRefs, callback, localResolve) {\r
+  // walk resolution table and replace with resolved refs\r
+  var ref;\r
+  for (ref in resolutionTable) {\r
+    var item = resolutionTable[ref];\r
+\r
+    var key = item.key;\r
+    var resolvedTo = resolvedRefs[key];\r
+    if (resolvedTo) {\r
+      spec.definitions = spec.definitions || {};\r
+      if (item.resolveAs === 'ref') {\r
+        if (localResolve !== true) {\r
+          // don't retain root for local definitions\r
+          for (key in resolvedTo.obj) {\r
+            var abs = this.retainRoot(resolvedTo.obj[key], item.root);\r
+          }\r
+        }\r
+        spec.definitions[resolvedTo.name] = resolvedTo.obj;\r
+        item.obj.$ref = '#/definitions/' + resolvedTo.name;\r
+      } else if (item.resolveAs === 'inline') {\r
+        var targetObj = item.obj;\r
+        targetObj['x-resolved-from'] = [ item.key ];\r
+        delete targetObj.$ref;\r
+\r
+        for (key in resolvedTo.obj) {\r
+          var abs = resolvedTo.obj[key];\r
+          \r
+          if (localResolve !== true) {\r
+            // don't retain root for local definitions\r
+            abs = this.retainRoot(resolvedTo.obj[key], item.root);\r
+          }\r
+          targetObj[key] = abs;\r
+        }\r
+      }\r
+    }\r
+  }\r
+  var existingUnresolved = this.countUnresolvedRefs(spec);\r
+\r
+  if(existingUnresolved === 0 || this.iteration > 5) {\r
+    this.resolveAllOf(spec.definitions);\r
+    callback.call(this.scope, spec, unresolvedRefs);\r
+  }\r
+  else {\r
+    this.iteration += 1;\r
+    this.resolve(spec, root, callback, this.scope);\r
+  }\r
+};\r
+\r
+Resolver.prototype.countUnresolvedRefs = function(spec) {\r
+  var i;\r
+  var refs = this.getRefs(spec);\r
+  var keys = [];\r
+  var unresolvedKeys = [];\r
+  for(i in refs) {\r
+    if(i.indexOf('#') === 0) {\r
+      keys.push(i.substring(1));\r
+    }\r
+    else {\r
+      unresolvedKeys.push(i);\r
+    }\r
+  }\r
+\r
+  // verify possible keys\r
+  for (i = 0; i < keys.length; i++) {\r
+    var part = keys[i];\r
+    var parts = part.split('/');\r
+    var obj = spec;\r
+\r
+    for (var k = 0; k < parts.length; k++) {\r
+      var key = parts[k];\r
+      if(key !== '') {\r
+        obj = obj[key];\r
+        if(typeof obj === 'undefined') {\r
+          unresolvedKeys.push(part);\r
+          break;\r
+        }\r
+      }\r
+    }\r
+  }\r
+  return unresolvedKeys.length;\r
+};\r
+\r
+Resolver.prototype.getRefs = function(spec, obj) {\r
+  obj = obj || spec;\r
+  var output = {};\r
+  for(var key in obj) {\r
+    if (!obj.hasOwnProperty(key)) {\r
+      continue;\r
+    }\r
+    var item = obj[key];\r
+    if(key === '$ref' && typeof item === 'string') {\r
+      output[item] = null;\r
+    }\r
+    else if(_.isObject(item)) {\r
+      var o = this.getRefs(item);\r
+      for(var k in o) {\r
+        output[k] = null;\r
+      }\r
+    }\r
+  }\r
+  return output;\r
+};\r
+\r
+Resolver.prototype.retainRoot = function(obj, root) {\r
+  // walk object and look for relative $refs\r
+  for(var key in obj) {\r
+    var item = obj[key];\r
+    if(key === '$ref' && typeof item === 'string') {\r
+      // stop and inspect\r
+      if(item.indexOf('http://') !== 0 && item.indexOf('https://') !== 0) {\r
+        // TODO: check if root ends in '/'.  If not, AND item has no protocol, make relative\r
+        var appendHash = true;\r
+        var oldRoot = root;\r
+        if(root) {\r
+          var lastChar = root.slice(-1);\r
+          if(lastChar !== '/' && (item.indexOf('#') !== 0 && item.indexOf('http://') !== 0 && item.indexOf('https://'))) {\r
+            console.log('working with ' + item);\r
+            appendHash = false;\r
+            var parts = root.split('\/');\r
+            parts = parts.splice(0, parts.length - 1);\r
+            root = '';\r
+            for(var i = 0; i < parts.length; i++) {\r
+              root += parts[i] + '/';\r
+            }\r
+          }\r
+        }\r
+        if(item.indexOf('#') !== 0 && appendHash) {\r
+          item = '#' + item;\r
+        }\r
+\r
+        item = (root || '') + item;\r
+        obj[key] = item;\r
+      }\r
+    }\r
+    else if(_.isObject(item)) {\r
+      this.retainRoot(item, root);\r
+    }\r
+  }\r
+  return obj;\r
+};\r
+\r
+/**\r
+ * immediately in-lines local refs, queues remote refs\r
+ * for inline resolution\r
+ */\r
+Resolver.prototype.resolveInline = function (root, spec, property, resolutionTable, unresolvedRefs, location) {\r
+  var key = property.$ref, ref = property.$ref, i, p, p2, rs;\r
+  var rootTrimmed = false;\r
+\r
+  root = root || '' // Guard against .split. @fehguy, you'll need to check if this logic fits\r
+  // More imporantly is how do we gracefully handle relative urls, when provided just a 'spec', not a 'url' ?\r
+\r
+  if (ref) {\r
+    if(ref.indexOf('../') === 0) {\r
+      // reset root\r
+      p = ref.split('../');\r
+      p2 = root.split('/');\r
+      ref = '';\r
+      for(i = 0; i < p.length; i++) {\r
+        if(p[i] === '') {\r
+          p2 = p2.slice(0, p2.length-1);\r
+        }\r
+        else {\r
+          ref += p[i];\r
+        }\r
+      }\r
+      root = '';\r
+      for(i = 0; i < p2.length - 1; i++) {\r
+        if(i > 0) { root += '/'; }\r
+        root += p2[i];\r
+      }\r
+      rootTrimmed = true;\r
+    }\r
+    if(ref.indexOf('#') >= 0) {\r
+      if(ref.indexOf('/') === 0) {\r
+        rs = ref.split('#');\r
+        p  = root.split('//');\r
+        p2 = p[1].split('/');\r
+        root = p[0] + '//' + p2[0] + rs[0];\r
+        location = rs[1];\r
+      }\r
+      else {\r
+        rs = ref.split('#');\r
+        if(rs[0] !== '') {\r
+          p2 = root.split('/');\r
+          p2 = p2.slice(0, p2.length - 1);\r
+          if(!rootTrimmed) {\r
+            root = '';\r
+            for (var k = 0; k < p2.length; k++) {\r
+              if(k > 0) { root += '/'; }\r
+              root += p2[k];\r
+            }\r
+          }\r
+          root += '/' + ref.split('#')[0];\r
+        }\r
+        location = rs[1];\r
+      }\r
+    }\r
+    if (ref.indexOf('http') === 0) {\r
+      if(ref.indexOf('#') >= 0) {\r
+        root = ref.split('#')[0];\r
+        location = ref.split('#')[1];\r
+      }\r
+      else {\r
+        root = ref;\r
+        location = '';\r
+      }\r
+      resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location});\r
+    } else if (ref.indexOf('#') === 0) {\r
+      location = ref.split('#')[1];\r
+      resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location});\r
+    } else if (ref.indexOf('/') === 0 && ref.indexOf('#') === -1) {\r
+      location = ref;\r
+      var matches = root.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);\r
+      if(matches) {\r
+        root = matches[0] + ref.substring(1);\r
+        location = '';\r
+      }\r
+      resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location});\r
+    }\r
+    else {\r
+      resolutionTable.push({obj: property, resolveAs: 'inline', root: root, key: key, location: location});\r
+    }\r
+  }\r
+  else if (property.type === 'array') {\r
+    this.resolveTo(root, property.items, resolutionTable, location);\r
+  }\r
+};\r
+\r
+Resolver.prototype.resolveTo = function (root, property, resolutionTable, location) {\r
+  var sp, i;\r
+  var ref = property.$ref;\r
+  var lroot = root;\r
+  if ((typeof ref !== 'undefined') && (ref !== null)) {\r
+    if(ref.indexOf('#') >= 0) {\r
+      var parts = ref.split('#');\r
+\r
+      // #/definitions/foo\r
+      // foo.json#/bar\r
+      if(parts[0] && ref.indexOf('/') === 0) {\r
+\r
+      }\r
+      else if(parts[0] && parts[0].indexOf('http') === 0) {\r
+        lroot = parts[0];\r
+        ref = parts[1];\r
+      }\r
+      else if(parts[0] && parts[0].length > 0) {\r
+        // relative file\r
+        sp = root.split('/');\r
+        lroot = '';\r
+        for(i = 0; i < sp.length - 1; i++) {\r
+          lroot += sp[i] + '/';\r
+        }\r
+        lroot += parts[0];\r
+      }\r
+      else {\r
+\r
+      }\r
+\r
+      location = parts[1];\r
+    }\r
+    else if (ref.indexOf('http://') === 0 || ref.indexOf('https://') === 0) {\r
+      lroot = ref;\r
+      location = '';\r
+    }\r
+    else {\r
+      // relative file\r
+      sp = root.split('/');\r
+      lroot = '';\r
+      for(i = 0; i < sp.length - 1; i++) {\r
+        lroot += sp[i] + '/';\r
+      }\r
+      lroot += ref;\r
+      location = '';\r
+    }\r
+    resolutionTable.push({\r
+      obj: property, resolveAs: 'ref', root: lroot, key: ref, location: location\r
+    });\r
+  } else if (property.type === 'array') {\r
+    var items = property.items;\r
+    this.resolveTo(root, items, resolutionTable, location);\r
+  } else {\r
+    if(property && property.properties) {\r
+      var name = this.uniqueName('inline_model');\r
+      if (property.title) {\r
+        name = this.uniqueName(property.title);\r
+      }\r
+      delete property.title;\r
+      this.spec.definitions[name] = _.cloneDeep(property);\r
+      property['$ref'] = '#/definitions/' + name;\r
+      delete property.type;\r
+      delete property.properties;\r
+    }\r
+  }\r
+};\r
+\r
+Resolver.prototype.uniqueName = function(base) {\r
+  var name = base;\r
+  var count = 0;\r
+  while(true) {\r
+    if(!_.isObject(this.spec.definitions[name])) {\r
+      return name;\r
+    }\r
+    name = base + '_' + count;\r
+    count++;\r
+  }\r
+};\r
+\r
+Resolver.prototype.resolveAllOf = function(spec, obj, depth) {\r
+  depth = depth || 0;\r
+  obj = obj || spec;\r
+  var name;\r
+  for(var key in obj) {\r
+    if (!obj.hasOwnProperty(key)) {\r
+      continue;\r
+    }\r
+    var item = obj[key];\r
+    if(item === null) {\r
+      throw new TypeError('Swagger 2.0 does not support null types (' + obj + ').  See https://github.com/swagger-api/swagger-spec/issues/229.');\r
+    }\r
+    if(typeof item === 'object') {\r
+      this.resolveAllOf(spec, item, depth + 1);\r
+    }\r
+    if(item && typeof item.allOf !== 'undefined') {\r
+      var allOf = item.allOf;\r
+      if(_.isArray(allOf)) {\r
+        var output = _.cloneDeep(item);\r
+        delete output.allOf;\r
+\r
+        output['x-composed'] = true;\r
+        if (typeof item['x-resolved-from'] !== 'undefined') {\r
+          output['x-resolved-from'] = item['x-resolved-from'];\r
+        }\r
+\r
+        for(var i = 0; i < allOf.length; i++) {\r
+          var component = allOf[i];\r
+          var source = 'self';\r
+          if(typeof component['x-resolved-from'] !== 'undefined') {\r
+            source = component['x-resolved-from'][0];\r
+          }\r
+\r
+          for(var part in component) {\r
+            if(!output.hasOwnProperty(part)) {\r
+              output[part] = _.cloneDeep(component[part]);\r
+              if(part === 'properties') {\r
+                for(name in output[part]) {\r
+                  output[part][name]['x-resolved-from'] = source;\r
+                }\r
+              }\r
+            }\r
+            else {\r
+              if(part === 'properties') {\r
+                var properties = component[part];\r
+                for(name in properties) {\r
+                  output.properties[name] = _.cloneDeep(properties[name]);\r
+                  var resolvedFrom = properties[name]['x-resolved-from'];\r
+                  if (typeof resolvedFrom === 'undefined' || resolvedFrom === 'self') {\r
+                    resolvedFrom = source;\r
+                  }\r
+                  output.properties[name]['x-resolved-from'] = resolvedFrom;\r
+                }\r
+              }\r
+              else if(part === 'required') {\r
+                // merge & dedup the required array\r
+                var a = output.required.concat(component[part]);\r
+                for(var k = 0; k < a.length; ++k) {\r
+                  for(var j = k + 1; j < a.length; ++j) {\r
+                    if(a[k] === a[j]) { a.splice(j--, 1); }\r
+                  }\r
+                }\r
+                output.required = a;\r
+              }\r
+              else if(part === 'x-resolved-from') {\r
+                output['x-resolved-from'].push(source);\r
+              }\r
+              else {\r
+                // TODO: need to merge this property\r
+                // console.log('what to do with ' + part)\r
+              }\r
+            }\r
+          }\r
+        }\r
+        obj[key] = output;\r
+      }\r
+    }\r
+  }\r
+};\r
+\r
+},{"./http":5,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isObject":146}],7:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Helpers = require('./helpers');\r
+\r
+var _ = {\r
+  isPlainObject: require('lodash-compat/lang/isPlainObject'),\r
+  isUndefined: require('lodash-compat/lang/isUndefined'),\r
+  isArray: require('lodash-compat/lang/isArray'),\r
+  isObject: require('lodash-compat/lang/isObject'),\r
+  isEmpty: require('lodash-compat/lang/isEmpty'),\r
+  map: require('lodash-compat/collection/map'),\r
+  indexOf: require('lodash-compat/array/indexOf'),\r
+  cloneDeep: require('lodash-compat/lang/cloneDeep'),\r
+  keys: require('lodash-compat/object/keys'),\r
+  forEach: require('lodash-compat/collection/forEach')\r
+};\r
+\r
+module.exports.optionHtml = optionHtml;\r
+module.exports.typeFromJsonSchema = typeFromJsonSchema;\r
+module.exports.getStringSignature = getStringSignature;\r
+module.exports.schemaToHTML = schemaToHTML;\r
+module.exports.schemaToJSON = schemaToJSON;\r
+\r
+function optionHtml(label, value) {\r
+  return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';\r
+}\r
+\r
+function typeFromJsonSchema(type, format) {\r
+  var str;\r
+\r
+  if (type === 'integer' && format === 'int32') {\r
+    str = 'integer';\r
+  } else if (type === 'integer' && format === 'int64') {\r
+    str = 'long';\r
+  } else if (type === 'integer' && typeof format === 'undefined') {\r
+    str = 'long';\r
+  } else if (type === 'string' && format === 'date-time') {\r
+    str = 'date-time';\r
+  } else if (type === 'string' && format === 'date') {\r
+    str = 'date';\r
+  } else if (type === 'number' && format === 'float') {\r
+    str = 'float';\r
+  } else if (type === 'number' && format === 'double') {\r
+    str = 'double';\r
+  } else if (type === 'number' && typeof format === 'undefined') {\r
+    str = 'double';\r
+  } else if (type === 'boolean') {\r
+    str = 'boolean';\r
+  } else if (type === 'string') {\r
+    str = 'string';\r
+  }\r
+\r
+  return str;\r
+}\r
+\r
+function getStringSignature(obj, baseComponent) {\r
+  var str = '';\r
+\r
+  if (typeof obj.$ref !== 'undefined') {\r
+    str += Helpers.simpleRef(obj.$ref);\r
+  } else if (typeof obj.type === 'undefined') {\r
+    str += 'object';\r
+  } else if (obj.type === 'array') {\r
+    if (baseComponent) {\r
+      str += getStringSignature((obj.items || obj.$ref || {}));\r
+    } else {\r
+      str += 'Array[';\r
+      str += getStringSignature((obj.items || obj.$ref || {}));\r
+      str += ']';\r
+    }\r
+  } else if (obj.type === 'integer' && obj.format === 'int32') {\r
+    str += 'integer';\r
+  } else if (obj.type === 'integer' && obj.format === 'int64') {\r
+    str += 'long';\r
+  } else if (obj.type === 'integer' && typeof obj.format === 'undefined') {\r
+    str += 'long';\r
+  } else if (obj.type === 'string' && obj.format === 'date-time') {\r
+    str += 'date-time';\r
+  } else if (obj.type === 'string' && obj.format === 'date') {\r
+    str += 'date';\r
+  } else if (obj.type === 'string' && typeof obj.format === 'undefined') {\r
+    str += 'string';\r
+  } else if (obj.type === 'number' && obj.format === 'float') {\r
+    str += 'float';\r
+  } else if (obj.type === 'number' && obj.format === 'double') {\r
+    str += 'double';\r
+  } else if (obj.type === 'number' && typeof obj.format === 'undefined') {\r
+    str += 'double';\r
+  } else if (obj.type === 'boolean') {\r
+    str += 'boolean';\r
+  } else if (obj.$ref) {\r
+    str += Helpers.simpleRef(obj.$ref);\r
+  } else {\r
+    str += obj.type;\r
+  }\r
+\r
+  return str;\r
+}\r
+\r
+function schemaToJSON(schema, models, modelsToIgnore, modelPropertyMacro) {\r
+  // Resolve the schema (Handle nested schemas)\r
+  schema = Helpers.resolveSchema(schema);\r
+\r
+  if(typeof modelPropertyMacro !== 'function') {\r
+    modelPropertyMacro = function(prop){\r
+      return (prop || {}).default;\r
+    };\r
+  }\r
+\r
+  modelsToIgnore= modelsToIgnore || {};\r
+\r
+  var type = schema.type || 'object';\r
+  var format = schema.format;\r
+  var model;\r
+  var output;\r
+\r
+  if (!_.isUndefined(schema.example)) {\r
+    output = schema.example;\r
+  } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) {\r
+    output = schema.enum[0];\r
+  }\r
+\r
+  if (_.isUndefined(output)) {\r
+    if (schema.$ref) {\r
+      model = models[Helpers.simpleRef(schema.$ref)];\r
+\r
+      if (!_.isUndefined(model)) {\r
+        if (_.isUndefined(modelsToIgnore[model.name])) {\r
+          modelsToIgnore[model.name] = model;\r
+          output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro);\r
+          delete modelsToIgnore[model.name];\r
+        } else {\r
+          if (model.type === 'array') {\r
+            output = [];\r
+          } else {\r
+            output = {};\r
+          }\r
+        }\r
+      }\r
+    } else if (!_.isUndefined(schema.default)) {\r
+      output = schema.default;\r
+    } else if (type === 'string') {\r
+      if (format === 'date-time') {\r
+        output = new Date().toISOString();\r
+      } else if (format === 'date') {\r
+        output = new Date().toISOString().split('T')[0];\r
+      } else {\r
+        output = 'string';\r
+      }\r
+    } else if (type === 'integer') {\r
+      output = 0;\r
+    } else if (type === 'number') {\r
+      output = 0.0;\r
+    } else if (type === 'boolean') {\r
+      output = true;\r
+    } else if (type === 'object') {\r
+      output = {};\r
+\r
+      _.forEach(schema.properties, function (property, name) {\r
+        var cProperty = _.cloneDeep(property);\r
+\r
+        // Allow macro to set the default value\r
+        cProperty.default = modelPropertyMacro(property);\r
+\r
+        output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro);\r
+      });\r
+    } else if (type === 'array') {\r
+      output = [];\r
+\r
+      if (_.isArray(schema.items)) {\r
+        _.forEach(schema.items, function (item) {\r
+          output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro));\r
+        });\r
+      } else if (_.isPlainObject(schema.items)) {\r
+        output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro));\r
+      } else if (_.isUndefined(schema.items)) {\r
+        output.push({});\r
+      } else {\r
+        Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process');\r
+      }\r
+    }\r
+  }\r
+\r
+  return output;\r
+}\r
+\r
+function schemaToHTML(name, schema, models, modelPropertyMacro) {\r
+\r
+  var strongOpen = '<span class="strong">';\r
+  var strongClose = '</span>';\r
+\r
+  // Allow for ignoring the 'name' argument.... shifting the rest\r
+  if(_.isObject(arguments[0])) {\r
+    name = void 0;\r
+    schema = arguments[0];\r
+    models = arguments[1];\r
+    modelPropertyMacro = arguments[2];\r
+  }\r
+\r
+  models = models || {};\r
+\r
+  // Resolve the schema (Handle nested schemas)\r
+  schema = Helpers.resolveSchema(schema);\r
+\r
+  // Return for empty object\r
+  if(_.isEmpty(schema)) {\r
+    return strongOpen + 'Empty' + strongClose;\r
+  }\r
+\r
+  // Dereference $ref from 'models'\r
+  if(typeof schema.$ref === 'string') {\r
+    name = Helpers.simpleRef(schema.$ref);\r
+    schema = models[name];\r
+    if(typeof schema === 'undefined')\r
+    {\r
+      return strongOpen + name + ' is not defined!' + strongClose;\r
+    }\r
+  }\r
+\r
+  if(typeof name !== 'string') {\r
+    name = schema.title || 'Inline Model';\r
+  }\r
+\r
+  // If we are a Model object... adjust accordingly\r
+  if(schema.definition) {\r
+    schema = schema.definition;\r
+  }\r
+\r
+  if(typeof modelPropertyMacro !== 'function') {\r
+    modelPropertyMacro = function(prop){\r
+      return (prop || {}).default;\r
+    };\r
+  }\r
+\r
+  var references = {};\r
+  var seenModels = [];\r
+  var inlineModels = 0;\r
+\r
+\r
+\r
+  // Generate current HTML\r
+  var html = processModel(schema, name);\r
+\r
+  // Generate references HTML\r
+  while (_.keys(references).length > 0) {\r
+    /* jshint ignore:start */\r
+    _.forEach(references, function (schema, name) {\r
+      var seenModel = _.indexOf(seenModels, name) > -1;\r
+\r
+      delete references[name];\r
+\r
+      if (!seenModel) {\r
+        seenModels.push(name);\r
+\r
+        html += '<br />' + processModel(schema, name);\r
+      }\r
+    });\r
+    /* jshint ignore:end */\r
+  }\r
+\r
+  return html;\r
+\r
+  /////////////////////////////////\r
+\r
+  function addReference(schema, name, skipRef) {\r
+    var modelName = name;\r
+    var model;\r
+\r
+    if (schema.$ref) {\r
+      modelName = schema.title || Helpers.simpleRef(schema.$ref);\r
+      model = models[modelName];\r
+    } else if (_.isUndefined(name)) {\r
+      modelName = schema.title || 'Inline Model ' + (++inlineModels);\r
+      model = {definition: schema};\r
+    }\r
+\r
+    if (skipRef !== true) {\r
+      references[modelName] = _.isUndefined(model) ? {} : model.definition;\r
+    }\r
+\r
+    return modelName;\r
+  }\r
+\r
+  function primitiveToHTML(schema) {\r
+    var html = '<span class="propType">';\r
+    var type = schema.type || 'object';\r
+\r
+    if (schema.$ref) {\r
+      html += addReference(schema, Helpers.simpleRef(schema.$ref));\r
+    } else if (type === 'object') {\r
+      if (!_.isUndefined(schema.properties)) {\r
+        html += addReference(schema);\r
+      } else {\r
+        html += 'object';\r
+      }\r
+    } else if (type === 'array') {\r
+      html += 'Array[';\r
+\r
+      if (_.isArray(schema.items)) {\r
+        html += _.map(schema.items, addReference).join(',');\r
+      } else if (_.isPlainObject(schema.items)) {\r
+        if (_.isUndefined(schema.items.$ref)) {\r
+          if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) {\r
+            html += schema.items.type;\r
+          } else {\r
+            html += addReference(schema.items);\r
+          }\r
+        } else {\r
+          html += addReference(schema.items, Helpers.simpleRef(schema.items.$ref));\r
+        }\r
+      } else {\r
+        Helpers.log('Array type\'s \'items\' schema is not an array or an object, cannot process');\r
+        html += 'object';\r
+      }\r
+\r
+      html += ']';\r
+    } else {\r
+      html += schema.type;\r
+    }\r
+\r
+    html += '</span>';\r
+\r
+    return html;\r
+  }\r
+\r
+  function primitiveToOptionsHTML(schema, html) {\r
+    var options = '';\r
+    var type = schema.type || 'object';\r
+    var isArray = type === 'array';\r
+\r
+    if (isArray) {\r
+      if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) {\r
+        type = schema.items.type;\r
+      } else {\r
+        type = 'object';\r
+      }\r
+    }\r
+\r
+    if (!_.isUndefined(schema.default)) {\r
+      options += optionHtml('Default', schema.default);\r
+    }\r
+\r
+    switch (type) {\r
+    case 'string':\r
+      if (schema.minLength) {\r
+        options += optionHtml('Min. Length', schema.minLength);\r
+      }\r
+\r
+      if (schema.maxLength) {\r
+        options += optionHtml('Max. Length', schema.maxLength);\r
+      }\r
+\r
+      if (schema.pattern) {\r
+        options += optionHtml('Reg. Exp.', schema.pattern);\r
+      }\r
+      break;\r
+    case 'integer':\r
+    case 'number':\r
+      if (schema.minimum) {\r
+        options += optionHtml('Min. Value', schema.minimum);\r
+      }\r
+\r
+      if (schema.exclusiveMinimum) {\r
+        options += optionHtml('Exclusive Min.', 'true');\r
+      }\r
+\r
+      if (schema.maximum) {\r
+        options += optionHtml('Max. Value', schema.maximum);\r
+      }\r
+\r
+      if (schema.exclusiveMaximum) {\r
+        options += optionHtml('Exclusive Max.', 'true');\r
+      }\r
+\r
+      if (schema.multipleOf) {\r
+        options += optionHtml('Multiple Of', schema.multipleOf);\r
+      }\r
+\r
+      break;\r
+    }\r
+\r
+    if (isArray) {\r
+      if (schema.minItems) {\r
+        options += optionHtml('Min. Items', schema.minItems);\r
+      }\r
+\r
+      if (schema.maxItems) {\r
+        options += optionHtml('Max. Items', schema.maxItems);\r
+      }\r
+\r
+      if (schema.uniqueItems) {\r
+        options += optionHtml('Unique Items', 'true');\r
+      }\r
+\r
+      if (schema.collectionFormat) {\r
+        options += optionHtml('Coll. Format', schema.collectionFormat);\r
+      }\r
+    }\r
+\r
+    if (_.isUndefined(schema.items)) {\r
+      if (_.isArray(schema.enum)) {\r
+        var enumString;\r
+\r
+        if (type === 'number' || type === 'integer') {\r
+          enumString = schema.enum.join(', ');\r
+        } else {\r
+          enumString = '"' + schema.enum.join('", "') + '"';\r
+        }\r
+\r
+        options += optionHtml('Enum', enumString);\r
+      }\r
+    }\r
+\r
+    if (options.length > 0) {\r
+      html = '<span class="propWrap">' + html + '<table class="optionsWrapper"><tr><th colspan="2">' + type + '</th></tr>' + options + '</table></span>';\r
+    }\r
+\r
+    return html;\r
+  }\r
+\r
+  function processModel(schema, name) {\r
+    var type = schema.type || 'object';\r
+    var isArray = schema.type === 'array';\r
+    var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose;\r
+\r
+    if (name) {\r
+      seenModels.push(name);\r
+    }\r
+\r
+    if (isArray) {\r
+      if (_.isArray(schema.items)) {\r
+        html += '<div>' + _.map(schema.items, function (item) {\r
+          var type = item.type || 'object';\r
+\r
+          if (_.isUndefined(item.$ref)) {\r
+            if (_.indexOf(['array', 'object'], type) > -1) {\r
+              if (type === 'object' && _.isUndefined(item.properties)) {\r
+                return 'object';\r
+              } else {\r
+                return addReference(item);\r
+              }\r
+            } else {\r
+              return primitiveToOptionsHTML(item, type);\r
+            }\r
+          } else {\r
+            return addReference(item, Helpers.simpleRef(item.$ref));\r
+          }\r
+        }).join(',</div><div>');\r
+      } else if (_.isPlainObject(schema.items)) {\r
+        if (_.isUndefined(schema.items.$ref)) {\r
+          if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) {\r
+            if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) {\r
+              html += '<div>object</div>';\r
+            } else {\r
+              html += '<div>' + addReference(schema.items) + '</div>';\r
+            }\r
+          } else {\r
+            html += '<div>' + primitiveToOptionsHTML(schema.items, schema.items.type) + '</div>';\r
+          }\r
+        } else {\r
+          html += '<div>' + addReference(schema.items, Helpers.simpleRef(schema.items.$ref)) + '</div>';\r
+        }\r
+      } else {\r
+        Helpers.log('Array type\'s \'items\' property is not an array or an object, cannot process');\r
+        html += '<div>object</div>';\r
+      }\r
+    } else {\r
+      if (schema.$ref) {\r
+        html += '<div>' + addReference(schema, name) + '</div>';\r
+      } else if (type === 'object') {\r
+        if (_.isPlainObject(schema.properties)) {\r
+          var contents = _.map(schema.properties, function (property, name) {\r
+            var propertyIsRequired = (_.indexOf(schema.required, name) >= 0);\r
+            var cProperty = _.cloneDeep(property);\r
+\r
+            var requiredClass = propertyIsRequired ? 'required' : '';\r
+            var html = '<span class="propName ' + requiredClass + '">' + name + '</span> (';\r
+            var model;\r
+            var propDescription;\r
+\r
+            // Allow macro to set the default value\r
+            cProperty.default = modelPropertyMacro(cProperty);\r
+\r
+            // Resolve the schema (Handle nested schemas)\r
+            cProperty = Helpers.resolveSchema(cProperty);\r
+\r
+            propDescription = property.description || cProperty.description;\r
+\r
+            // We need to handle property references to primitives (Issue 339)\r
+            if (!_.isUndefined(cProperty.$ref)) {\r
+              model = models[Helpers.simpleRef(cProperty.$ref)];\r
+\r
+              if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) {\r
+                // Use referenced schema\r
+                cProperty = Helpers.resolveSchema(model.definition);\r
+              }\r
+            }\r
+\r
+            html += primitiveToHTML(cProperty);\r
+\r
+            if(!propertyIsRequired) {\r
+              html += ', <span class="propOptKey">optional</span>';\r
+            }\r
+\r
+            if(property.readOnly) {\r
+                html += ', <span class="propReadOnly">read only</span>';\r
+            }\r
+\r
+            html += ')';\r
+\r
+            if (!_.isUndefined(propDescription)) {\r
+              html += ': ' + '<span class="propDesc">' + propDescription + '</span>';\r
+            }\r
+\r
+            if (cProperty.enum) {\r
+              html += ' = <span class="propVals">[\'' + cProperty.enum.join('\', \'') + '\']</span>';\r
+            }\r
+\r
+            return '<div' + (property.readOnly ? ' class="readOnly"' : '') + '>' + primitiveToOptionsHTML(cProperty, html);\r
+          }).join(',</div>');\r
+\r
+          if (contents) {\r
+            html += contents + '</div>';\r
+          }\r
+        }\r
+      } else {\r
+        html += '<div>' + primitiveToOptionsHTML(schema, type) + '</div>';\r
+      }\r
+    }\r
+\r
+    return html + strongOpen + (isArray ? ']' : '}') + strongClose;\r
+  }\r
+}\r
+\r
+},{"./helpers":4,"lodash-compat/array/indexOf":51,"lodash-compat/collection/forEach":56,"lodash-compat/collection/map":58,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isEmpty":143,"lodash-compat/lang/isObject":146,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isUndefined":150,"lodash-compat/object/keys":151}],8:[function(require,module,exports){\r
+'use strict';\r
+\r
+var SwaggerHttp = require('./http');\r
+var _ = {\r
+  isObject: require('lodash-compat/lang/isObject')\r
+};\r
+\r
+var SwaggerSpecConverter = module.exports = function () {\r
+  this.errors = [];\r
+  this.warnings = [];\r
+  this.modelMap = {};\r
+};\r
+\r
+SwaggerSpecConverter.prototype.setDocumentationLocation = function (location) {\r
+  this.docLocation = location;\r
+};\r
+\r
+/**\r
+ * converts a resource listing OR api declaration\r
+ **/\r
+SwaggerSpecConverter.prototype.convert = function (obj, clientAuthorizations, opts, callback) {\r
+  // not a valid spec\r
+  if(!obj || !Array.isArray(obj.apis)) {\r
+    return this.finish(callback, null);\r
+  }\r
+  this.clientAuthorizations = clientAuthorizations;\r
+\r
+  // create a new swagger object to return\r
+  var swagger = { swagger: '2.0' };\r
+\r
+  swagger.originalVersion = obj.swaggerVersion;\r
+\r
+  // add the info\r
+  this.apiInfo(obj, swagger);\r
+\r
+  // add security definitions\r
+  this.securityDefinitions(obj, swagger);\r
+\r
+  // take basePath into account\r
+  if (obj.basePath) {\r
+    this.setDocumentationLocation(obj.basePath);\r
+  }\r
+\r
+  // see if this is a single-file swagger definition\r
+  var isSingleFileSwagger = false;\r
+  var i;\r
+  for(i = 0; i < obj.apis.length; i++) {\r
+    var api = obj.apis[i];\r
+    if(Array.isArray(api.operations)) {\r
+      isSingleFileSwagger = true;\r
+    }\r
+  }\r
+  if(isSingleFileSwagger) {\r
+    this.declaration(obj, swagger);\r
+    this.finish(callback, swagger);\r
+  }\r
+  else {\r
+    this.resourceListing(obj, swagger, opts, callback);\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.declaration = function(obj, swagger) {\r
+  var name, i, p, pos;\r
+  if(!obj.apis) {\r
+    return;\r
+  }\r
+\r
+  if (obj.basePath.indexOf('http://') === 0) {\r
+    p = obj.basePath.substring('http://'.length);\r
+    pos = p.indexOf('/');\r
+    if (pos > 0) {\r
+      swagger.host = p.substring(0, pos);\r
+      swagger.basePath = p.substring(pos);\r
+    }\r
+    else {\r
+      swagger.host = p;\r
+      swagger.basePath = '/';\r
+    }\r
+  } else if (obj.basePath.indexOf('https://') === 0) {\r
+    p = obj.basePath.substring('https://'.length);\r
+    pos = p.indexOf('/');\r
+    if (pos > 0) {\r
+      swagger.host = p.substring(0, pos);\r
+      swagger.basePath = p.substring(pos);\r
+    }\r
+    else {\r
+      swagger.host = p;\r
+      swagger.basePath = '/';\r
+    }\r
+  } else {\r
+    swagger.basePath = obj.basePath;\r
+  }\r
+\r
+  var resourceLevelAuth;\r
+  if(obj.authorizations) {\r
+    resourceLevelAuth = obj.authorizations;\r
+  }\r
+  if(obj.consumes) {\r
+    swagger.consumes = obj.consumes;\r
+  }\r
+  if(obj.produces) {\r
+    swagger.produces = obj.produces;\r
+  }\r
+\r
+  // build a mapping of id to name for 1.0 model resolutions\r
+  if(_.isObject(obj)) {\r
+    for(name in obj.models) {\r
+      var existingModel = obj.models[name];\r
+      var key = (existingModel.id || name);\r
+      this.modelMap[key] = name;\r
+    }\r
+  }\r
+\r
+  for(i = 0; i < obj.apis.length; i++) {\r
+    var api = obj.apis[i];\r
+    var path = api.path;\r
+    var operations = api.operations;\r
+    this.operations(path, obj.resourcePath, operations, resourceLevelAuth, swagger);\r
+  }\r
+\r
+  var models = obj.models || {};\r
+  this.models(models, swagger);\r
+};\r
+\r
+SwaggerSpecConverter.prototype.models = function(obj, swagger) {\r
+  if(!_.isObject(obj)) {\r
+    return;\r
+  }\r
+  var name;\r
+\r
+  swagger.definitions = swagger.definitions || {};\r
+  for(name in obj) {\r
+    var existingModel = obj[name];\r
+    var _required = [];\r
+    var schema = { properties: {}};\r
+    var propertyName;\r
+    for(propertyName in existingModel.properties) {\r
+      var existingProperty = existingModel.properties[propertyName];\r
+      var property = {};\r
+      this.dataType(existingProperty, property);\r
+      if(existingProperty.description) {\r
+        property.description = existingProperty.description;\r
+      }\r
+      if(existingProperty['enum']) {\r
+        property['enum'] = existingProperty['enum'];\r
+      }\r
+      if(typeof existingProperty.required === 'boolean' && existingProperty.required === true) {\r
+        _required.push(propertyName);\r
+      }\r
+      if(typeof existingProperty.required === 'string' && existingProperty.required === 'true') {\r
+        _required.push(propertyName);\r
+      }\r
+      schema.properties[propertyName] = property;\r
+    }\r
+    if(_required.length > 0) {\r
+      schema.required = _required;\r
+    } else {\r
+      schema.required = existingModel.required;\r
+    }\r
+    swagger.definitions[name] = schema;\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.extractTag = function(resourcePath) {\r
+  var pathString = resourcePath || 'default';\r
+  if(pathString.indexOf('http:') === 0 || pathString.indexOf('https:') === 0) {\r
+    pathString = pathString.split(['/']);\r
+    pathString = pathString[pathString.length -1].substring();\r
+  }\r
+  if(pathString.endsWith('.json')) {\r
+    pathString = pathString.substring(0, pathString.length - '.json'.length);\r
+  }\r
+  return pathString.replace('/','');\r
+};\r
+\r
+SwaggerSpecConverter.prototype.operations = function(path, resourcePath, obj, resourceLevelAuth, swagger) {\r
+  if(!Array.isArray(obj)) {\r
+    return;\r
+  }\r
+  var i;\r
+\r
+  if(!swagger.paths) {\r
+    swagger.paths = {};\r
+  }\r
+\r
+  var pathObj = swagger.paths[path] || {};\r
+  var tag = this.extractTag(resourcePath);\r
+  swagger.tags = swagger.tags || [];\r
+  var matched = false;\r
+  for(i = 0; i < swagger.tags.length; i++) {\r
+    var tagObject = swagger.tags[i];\r
+    if(tagObject.name === tag) {\r
+      matched = true;\r
+    }\r
+  }\r
+  if(!matched) {\r
+    swagger.tags.push({name: tag});\r
+  }\r
+\r
+  for(i = 0; i < obj.length; i++) {\r
+    var existingOperation = obj[i];\r
+    var method = (existingOperation.method || existingOperation.httpMethod).toLowerCase();\r
+    var operation = {tags: [tag]};\r
+    var existingAuthorizations = existingOperation.authorizations;\r
+\r
+    if(existingAuthorizations && Object.keys(existingAuthorizations).length === 0) {\r
+      existingAuthorizations = resourceLevelAuth;\r
+    }\r
+\r
+    if(typeof existingAuthorizations !== 'undefined') {\r
+      var scopesObject;\r
+      for(var key in existingAuthorizations) {\r
+        operation.security = operation.security || [];\r
+        var scopes = existingAuthorizations[key];\r
+        if(scopes) {\r
+          var securityScopes = [];\r
+          for(var j in scopes) {\r
+            securityScopes.push(scopes[j].scope);\r
+          }\r
+          scopesObject = {};\r
+          scopesObject[key] = securityScopes;\r
+          operation.security.push(scopesObject);\r
+        }\r
+        else {\r
+          scopesObject = {};\r
+          scopesObject[key] = [];\r
+          operation.security.push(scopesObject);\r
+        }\r
+      }\r
+    }\r
+\r
+    if(existingOperation.consumes) {\r
+      operation.consumes = existingOperation.consumes;\r
+    }\r
+    else if(swagger.consumes) {\r
+      operation.consumes = swagger.consumes;\r
+    }\r
+    if(existingOperation.produces) {\r
+      operation.produces = existingOperation.produces;\r
+    }\r
+    else if(swagger.produces) {\r
+      operation.produces = swagger.produces;\r
+    }\r
+    if(existingOperation.summary) {\r
+      operation.summary = existingOperation.summary;\r
+    }\r
+    if(existingOperation.notes) {\r
+      operation.description = existingOperation.notes;\r
+    }\r
+    if(existingOperation.nickname) {\r
+      operation.operationId = existingOperation.nickname;\r
+    }\r
+    if(existingOperation.deprecated) {\r
+      operation.deprecated = existingOperation.deprecated;\r
+    }\r
+\r
+    this.authorizations(existingAuthorizations, swagger);\r
+    this.parameters(operation, existingOperation.parameters, swagger);\r
+    this.responseMessages(operation, existingOperation, swagger);\r
+\r
+    pathObj[method] = operation;\r
+  }\r
+\r
+  swagger.paths[path] = pathObj;\r
+};\r
+\r
+SwaggerSpecConverter.prototype.responseMessages = function(operation, existingOperation) {\r
+  if(!_.isObject(existingOperation)) {\r
+    return;\r
+  }\r
+  // build default response from the operation (1.x)\r
+  var defaultResponse = {};\r
+  this.dataType(existingOperation, defaultResponse);\r
+  // TODO: look into the real problem of rendering responses in swagger-ui\r
+  // ....should reponseType have an implicit schema?\r
+  if(!defaultResponse.schema && defaultResponse.type) {\r
+    defaultResponse = {schema: defaultResponse};\r
+  }\r
+\r
+  operation.responses = operation.responses || {};\r
+\r
+  // grab from responseMessages (1.2)\r
+  var has200 = false;\r
+  if(Array.isArray(existingOperation.responseMessages)) {\r
+    var i;\r
+    var existingResponses = existingOperation.responseMessages;\r
+    for(i = 0; i < existingResponses.length; i++) {\r
+      var existingResponse = existingResponses[i];\r
+      var response = { description: existingResponse.message };\r
+      if(existingResponse.code === 200) {\r
+        has200 = true;\r
+      }\r
+      // Convert responseModel -> schema{$ref: responseModel}\r
+      if(existingResponse.responseModel) {\r
+        response.schema = {'$ref': '#/definitions/' + existingResponse.responseModel};\r
+      }\r
+      operation.responses['' + existingResponse.code] = response;\r
+    }\r
+  }\r
+\r
+  if(has200) {\r
+    operation.responses['default'] = defaultResponse;\r
+  }\r
+  else {\r
+    operation.responses['200'] = defaultResponse;\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.authorizations = function(obj) {\r
+  // TODO\r
+  if(!_.isObject(obj)) {\r
+    return;\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.parameters = function(operation, obj) {\r
+  if(!Array.isArray(obj)) {\r
+    return;\r
+  }\r
+  var i;\r
+  for(i = 0; i < obj.length; i++) {\r
+    var existingParameter = obj[i];\r
+    var parameter = {};\r
+    parameter.name = existingParameter.name;\r
+    parameter.description = existingParameter.description;\r
+    parameter.required = existingParameter.required;\r
+    parameter.in = existingParameter.paramType;\r
+\r
+    // per #168\r
+    if(parameter.in === 'body') {\r
+      parameter.name = 'body';\r
+    }\r
+    if(parameter.in === 'form') {\r
+      parameter.in = 'formData';\r
+    }\r
+\r
+    if(existingParameter.enum) {\r
+      parameter.enum = existingParameter.enum;\r
+    }\r
+\r
+    if(existingParameter.allowMultiple === true || existingParameter.allowMultiple === 'true') {\r
+      var innerType = {};\r
+      this.dataType(existingParameter, innerType);\r
+      parameter.type = 'array';\r
+      parameter.items = innerType;\r
+\r
+      if(existingParameter.allowableValues) {\r
+        var av = existingParameter.allowableValues;\r
+        if(av.valueType === 'LIST') {\r
+          parameter['enum'] = av.values;\r
+        }\r
+      }\r
+    }\r
+    else {\r
+      this.dataType(existingParameter, parameter);\r
+    }\r
+    if(typeof existingParameter.defaultValue !== 'undefined') {\r
+      parameter.default = existingParameter.defaultValue;\r
+    }\r
+\r
+    operation.parameters = operation.parameters || [];\r
+    operation.parameters.push(parameter);\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.dataType = function(source, target) {\r
+  if(!_.isObject(source)) {\r
+    return;\r
+  }\r
+\r
+  if(source.minimum) {\r
+    target.minimum = source.minimum;\r
+  }\r
+  if(source.maximum) {\r
+    target.maximum = source.maximum;\r
+  }\r
+  if (source.format) {\r
+    target.format = source.format;\r
+  }\r
+\r
+  // default can be 'false'\r
+  if(typeof source.defaultValue !== 'undefined') {\r
+    target.default = source.defaultValue;\r
+  }\r
+\r
+  var jsonSchemaType = this.toJsonSchema(source);\r
+  if(jsonSchemaType) {\r
+    target = target || {};\r
+    if(jsonSchemaType.type) {\r
+      target.type = jsonSchemaType.type;\r
+    }\r
+    if(jsonSchemaType.format) {\r
+      target.format = jsonSchemaType.format;\r
+    }\r
+    if(jsonSchemaType.$ref) {\r
+      target.schema = {$ref: jsonSchemaType.$ref};\r
+    }\r
+    if(jsonSchemaType.items) {\r
+      target.items = jsonSchemaType.items;\r
+    }\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.toJsonSchema = function(source) {\r
+  if(!source) {\r
+    return 'object';\r
+  }\r
+  var detectedType = (source.type || source.dataType || source.responseClass || '');\r
+  var lcType = detectedType.toLowerCase();\r
+  var format = (source.format || '').toLowerCase();\r
+\r
+  if(lcType.indexOf('list[') === 0) {\r
+    var innerType = detectedType.substring(5, detectedType.length - 1);\r
+    var jsonType = this.toJsonSchema({type: innerType});\r
+    return {type: 'array', items: jsonType};\r
+  } else if(lcType === 'int' || (lcType === 'integer' && format === 'int32')) {\r
+    {return {type: 'integer', format: 'int32'};}\r
+  } else if(lcType === 'long' || (lcType === 'integer' && format === 'int64')) {\r
+    {return {type: 'integer', format: 'int64'};}\r
+  } else if(lcType === 'integer') {\r
+    {return {type: 'integer', format: 'int64'};}\r
+  } else if(lcType === 'float' || (lcType === 'number' && format === 'float')) {\r
+    {return {type: 'number', format: 'float'};}\r
+  } else if(lcType === 'double' || (lcType === 'number' && format === 'double')) {\r
+    {return {type: 'number', format: 'double'};}\r
+  } else if((lcType === 'string' && format === 'date-time') || (lcType === 'date')) {\r
+    {return {type: 'string', format: 'date-time'};}\r
+  } else if(lcType === 'string') {\r
+    {return {type: 'string'};}\r
+  } else if(lcType === 'file') {\r
+    {return {type: 'file'};}\r
+  } else if(lcType === 'boolean') {\r
+    {return {type: 'boolean'};}\r
+  } else if(lcType === 'boolean') {\r
+    {return {type: 'boolean'};}\r
+  } else if(lcType === 'array' || lcType === 'list') {\r
+    if(source.items) {\r
+      var it = this.toJsonSchema(source.items);\r
+      return {type: 'array', items: it};\r
+    }\r
+    else {\r
+      return {type: 'array', items: {type: 'object'}};\r
+    }\r
+  } else if(source.$ref) {\r
+    return {$ref: this.modelMap[source.$ref] ? '#/definitions/' + this.modelMap[source.$ref] : source.$ref};\r
+  } else if(lcType === 'void' || lcType === '') {\r
+    {return {};}\r
+  } else if (this.modelMap[source.type]) {\r
+    // If this a model using `type` instead of `$ref`, that's fine.\r
+    return {$ref: '#/definitions/' + this.modelMap[source.type]};\r
+  } else {\r
+    // Unknown model type or 'object', pass it along.\r
+    return {type: source.type};\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.resourceListing = function(obj, swagger, opts, callback) {\r
+  var i;\r
+  var processedCount = 0;   // jshint ignore:line\r
+  var self = this;          // jshint ignore:line\r
+  var expectedCount = obj.apis.length;\r
+  var _swagger = swagger;   // jshint ignore:line\r
+  var _opts = {};\r
+\r
+  if(opts && opts.requestInterceptor){\r
+    _opts.requestInterceptor = opts.requestInterceptor;\r
+  }\r
+\r
+  if(opts && opts.responseInterceptor){\r
+    _opts.responseInterceptor = opts.responseInterceptor;\r
+  }\r
+\r
+  var swaggerRequestHeaders = 'application/json';\r
+\r
+  if(opts && opts.swaggerRequestHeaders) {\r
+    swaggerRequestHeaders = opts.swaggerRequestHeaders;\r
+  }\r
+\r
+  if(expectedCount === 0) {\r
+    this.finish(callback, swagger);\r
+  }\r
+\r
+  for(i = 0; i < expectedCount; i++) {\r
+    var api = obj.apis[i];\r
+    var path = api.path;\r
+    var absolutePath = this.getAbsolutePath(obj.swaggerVersion, this.docLocation, path);\r
+\r
+    if(api.description) {\r
+      swagger.tags = swagger.tags || [];\r
+      swagger.tags.push({\r
+        name : this.extractTag(api.path),\r
+        description : api.description || ''\r
+      });\r
+    }\r
+    var http = {\r
+      url: absolutePath,\r
+      headers: { accept: swaggerRequestHeaders },\r
+      on: {},\r
+      method: 'get'\r
+    };\r
+    /* jshint ignore:start */\r
+    http.on.response = function(data) {\r
+      processedCount += 1;\r
+      var obj = data.obj;\r
+      if(obj) {\r
+        self.declaration(obj, _swagger);\r
+      }\r
+      if(processedCount === expectedCount) {\r
+        self.finish(callback, _swagger);\r
+      }\r
+    };\r
+    http.on.error = function(data) {\r
+      console.error(data);\r
+      processedCount += 1;\r
+      if(processedCount === expectedCount) {\r
+        self.finish(callback, _swagger);\r
+      }\r
+    };\r
+    /* jshint ignore:end */\r
+\r
+    if(this.clientAuthorizations && typeof this.clientAuthorizations.apply === 'function') {\r
+      this.clientAuthorizations.apply(http);\r
+    }\r
+\r
+    new SwaggerHttp().execute(http, _opts);\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.getAbsolutePath = function(version, docLocation, path)  {\r
+  if(version === '1.0') {\r
+    if(docLocation.endsWith('.json')) {\r
+      // get root path\r
+      var pos = docLocation.lastIndexOf('/');\r
+      if(pos > 0) {\r
+        docLocation = docLocation.substring(0, pos);\r
+      }\r
+    }\r
+  }\r
+\r
+  var location = docLocation;\r
+  if(path.indexOf('http://') === 0 || path.indexOf('https://') === 0) {\r
+    location = path;\r
+  }\r
+  else {\r
+    if(docLocation.endsWith('/')) {\r
+      location = docLocation.substring(0, docLocation.length - 1);\r
+    }\r
+    location += path;\r
+  }\r
+  location = location.replace('{format}', 'json');\r
+  return location;\r
+};\r
+\r
+SwaggerSpecConverter.prototype.securityDefinitions = function(obj, swagger) {\r
+  if(obj.authorizations) {\r
+    var name;\r
+    for(name in obj.authorizations) {\r
+      var isValid = false;\r
+      var securityDefinition = {};\r
+      var definition = obj.authorizations[name];\r
+      if(definition.type === 'apiKey') {\r
+        securityDefinition.type = 'apiKey';\r
+        securityDefinition.in = definition.passAs;\r
+        securityDefinition.name = definition.keyname || name;\r
+        isValid = true;\r
+      }\r
+      else if(definition.type === 'basicAuth') {\r
+        securityDefinition.type = 'basicAuth';\r
+        isValid = true;\r
+      }\r
+      else if(definition.type === 'oauth2') {\r
+        var existingScopes = definition.scopes || [];\r
+        var scopes = {};\r
+        var i;\r
+        for(i in existingScopes) {\r
+          var scope = existingScopes[i];\r
+          scopes[scope.scope] = scope.description;\r
+        }\r
+        securityDefinition.type = 'oauth2';\r
+        if(i > 0) {\r
+          securityDefinition.scopes = scopes;\r
+        }\r
+        if(definition.grantTypes) {\r
+          if(definition.grantTypes.implicit) {\r
+            var implicit = definition.grantTypes.implicit;\r
+            securityDefinition.flow = 'implicit';\r
+            securityDefinition.authorizationUrl = implicit.loginEndpoint;\r
+            isValid = true;\r
+          }\r
+          /* jshint ignore:start */\r
+          if(definition.grantTypes['authorization_code']) {\r
+            if(!securityDefinition.flow) {\r
+              // cannot set if flow is already defined\r
+              var authCode = definition.grantTypes['authorization_code'];\r
+              securityDefinition.flow = 'accessCode';\r
+              securityDefinition.authorizationUrl = authCode.tokenRequestEndpoint.url;\r
+              securityDefinition.tokenUrl = authCode.tokenEndpoint.url;\r
+              isValid = true;\r
+            }\r
+          }\r
+          /* jshint ignore:end */\r
+        }\r
+      }\r
+      if(isValid) {\r
+        swagger.securityDefinitions = swagger.securityDefinitions || {};\r
+        swagger.securityDefinitions[name] = securityDefinition;\r
+      }\r
+    }\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.apiInfo = function(obj, swagger) {\r
+  // info section\r
+  if(obj.info) {\r
+    var info = obj.info;\r
+    swagger.info = {};\r
+\r
+    if(info.contact) {\r
+      swagger.info.contact = {};\r
+      swagger.info.contact.email = info.contact;\r
+    }\r
+    if(info.description) {\r
+      swagger.info.description = info.description;\r
+    }\r
+    if(info.title) {\r
+      swagger.info.title = info.title;\r
+    }\r
+    if(info.termsOfServiceUrl) {\r
+      swagger.info.termsOfService = info.termsOfServiceUrl;\r
+    }\r
+    if(info.license || info.licenseUrl) {\r
+      swagger.license = {};\r
+      if(info.license) {\r
+        swagger.license.name = info.license;\r
+      }\r
+      if(info.licenseUrl) {\r
+        swagger.license.url = info.licenseUrl;\r
+      }\r
+    }\r
+  }\r
+  else {\r
+    this.warnings.push('missing info section');\r
+  }\r
+};\r
+\r
+SwaggerSpecConverter.prototype.finish = function (callback, obj) {\r
+  callback(obj);\r
+};\r
+\r
+},{"./http":5,"lodash-compat/lang/isObject":146}],9:[function(require,module,exports){\r
+'use strict';\r
+\r
+var log = require('../helpers').log;\r
+var _ = {\r
+  isPlainObject: require('lodash-compat/lang/isPlainObject'),\r
+  isString: require('lodash-compat/lang/isString'),\r
+};\r
+\r
+var SchemaMarkup = require('../schema-markup.js');\r
+var jsyaml = require('js-yaml');\r
+\r
+var Model = module.exports = function (name, definition, models, modelPropertyMacro) {\r
+  this.definition = definition || {};\r
+  this.isArray = definition.type === 'array';\r
+  this.models = models || {};\r
+  this.name = name || definition.title || 'Inline Model';\r
+  this.modelPropertyMacro = modelPropertyMacro || function (property) {\r
+    return property.default;\r
+  };\r
+\r
+  return this;\r
+};\r
+\r
+// Note!  This function will be removed in 2.2.x!\r
+Model.prototype.createJSONSample = Model.prototype.getSampleValue = function (modelsToIgnore) {\r
+  modelsToIgnore = modelsToIgnore || {};\r
+\r
+  modelsToIgnore[this.name] = this;\r
+\r
+  // Response support\r
+  if (this.examples && _.isPlainObject(this.examples) && this.examples['application/json']) {\r
+    this.definition.example = this.examples['application/json'];\r
+\r
+    if (_.isString(this.definition.example)) {\r
+      this.definition.example = jsyaml.safeLoad(this.definition.example);\r
+    }\r
+  } else if (!this.definition.example) {\r
+    this.definition.example = this.examples;\r
+  }\r
+\r
+  return SchemaMarkup.schemaToJSON(this.definition, this.models, modelsToIgnore, this.modelPropertyMacro);\r
+};\r
+\r
+Model.prototype.getMockSignature = function () {\r
+  return SchemaMarkup.schemaToHTML(this.name, this.definition, this.models, this.modelPropertyMacro);\r
+};\r
+\r
+},{"../helpers":4,"../schema-markup.js":7,"js-yaml":21,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isString":148}],10:[function(require,module,exports){\r
+'use strict';\r
+\r
+var _ = {\r
+  cloneDeep: require('lodash-compat/lang/cloneDeep'),\r
+  isUndefined: require('lodash-compat/lang/isUndefined'),\r
+  isEmpty: require('lodash-compat/lang/isEmpty'),\r
+  isObject: require('lodash-compat/lang/isObject')\r
+};\r
+var helpers = require('../helpers');\r
+var Model = require('./model');\r
+var SwaggerHttp = require('../http');\r
+var Q = require('q');\r
+\r
+var Operation = module.exports = function (parent, scheme, operationId, httpMethod, path, args, definitions, models, clientAuthorizations) {\r
+  var errors = [];\r
+\r
+  parent = parent || {};\r
+  args = args || {};\r
+\r
+  if(parent && parent.options) {\r
+    this.client = parent.options.client || null;\r
+    this.requestInterceptor = parent.options.requestInterceptor || null;\r
+    this.responseInterceptor = parent.options.responseInterceptor || null;\r
+  }\r
+  this.authorizations = args.security;\r
+  this.basePath = parent.basePath || '/';\r
+  this.clientAuthorizations = clientAuthorizations;\r
+  this.consumes = args.consumes || parent.consumes || ['application/json'];\r
+  this.produces = args.produces || parent.produces || ['application/json'];\r
+  this.deprecated = args.deprecated;\r
+  this.description = args.description;\r
+  this.host = parent.host || 'localhost';\r
+  this.method = (httpMethod || errors.push('Operation ' + operationId + ' is missing method.'));\r
+  this.models = models || {};\r
+  this.nickname = (operationId || errors.push('Operations must have a nickname.'));\r
+  this.operation = args;\r
+  this.operations = {};\r
+  this.parameters = args !== null ? (args.parameters || []) : {};\r
+  this.parent = parent;\r
+  this.path = (path || errors.push('Operation ' + this.nickname + ' is missing path.'));\r
+  this.responses = (args.responses || {});\r
+  this.scheme = scheme || parent.scheme || 'http';\r
+  this.schemes = args.schemes || parent.schemes;\r
+  this.security = args.security || parent.security;\r
+  this.summary = args.summary || '';\r
+  this.type = null;\r
+  this.useJQuery = parent.useJQuery;\r
+  this.enableCookies = parent.enableCookies;\r
+  this.parameterMacro = parent.parameterMacro || function (operation, parameter) {\r
+    return parameter.default;\r
+  };\r
+\r
+  this.inlineModels = [];\r
+\r
+  if (typeof this.deprecated === 'string') {\r
+    switch(this.deprecated.toLowerCase()) {\r
+      case 'true': case 'yes': case '1': {\r
+        this.deprecated = true;\r
+        break;\r
+      }\r
+\r
+      case 'false': case 'no': case '0': case null: {\r
+        this.deprecated = false;\r
+        break;\r
+      }\r
+\r
+      default: this.deprecated = Boolean(this.deprecated);\r
+    }\r
+  }\r
+\r
+  var i, model;\r
+\r
+  if (definitions) {\r
+    // add to global models\r
+    var key;\r
+\r
+    for (key in definitions) {\r
+      model = new Model(key, definitions[key], this.models, parent.modelPropertyMacro);\r
+\r
+      if (model) {\r
+        this.models[key] = model;\r
+      }\r
+    }\r
+  }\r
+  else {\r
+    definitions = {};\r
+  }\r
+\r
+  for (i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+\r
+    // Allow macro to set the default value\r
+    param.default = this.parameterMacro(this, param);\r
+\r
+    if (param.type === 'array') {\r
+      param.isList = true;\r
+      param.allowMultiple = true;\r
+      // the enum can be defined at the items level\r
+      //if (param.items && param.items.enum) {\r
+      //  param['enum'] = param.items.enum;\r
+      //}\r
+    }\r
+\r
+    var innerType = this.getType(param);\r
+\r
+    if (innerType && innerType.toString().toLowerCase() === 'boolean') {\r
+      param.allowableValues = {};\r
+      param.isList = true;\r
+      param['enum'] = [true, false]; // use actual primitives\r
+    }\r
+\r
+    if(typeof param['x-example'] !== 'undefined') {\r
+      var d = param['x-example'];\r
+      param.default = d;\r
+    }\r
+    if(param['x-examples']) {\r
+      var d = param['x-examples'].default;\r
+      if(typeof d !== 'undefined') {\r
+        param.default = d;\r
+      }\r
+    }\r
+\r
+    var enumValues = param['enum'] || (param.items && param.items['enum']);\r
+\r
+    if (typeof enumValues !== 'undefined') {\r
+      var id;\r
+\r
+      param.allowableValues = {};\r
+      param.allowableValues.values = [];\r
+      param.allowableValues.descriptiveValues = [];\r
+\r
+      for (id = 0; id < enumValues.length; id++) {\r
+        var value = enumValues[id];\r
+        var isDefault = (value === param.default || value+'' === param.default);\r
+\r
+        param.allowableValues.values.push(value);\r
+        // Always have string for descriptive values....\r
+        param.allowableValues.descriptiveValues.push({value : value+'', isDefault: isDefault});\r
+      }\r
+    }\r
+\r
+    if (param.type === 'array') {\r
+      innerType = [innerType];\r
+\r
+      if (typeof param.allowableValues === 'undefined') {\r
+        // can't show as a list if no values to select from\r
+        delete param.isList;\r
+        delete param.allowMultiple;\r
+      }\r
+    }\r
+\r
+    param.modelSignature = {type: innerType, definitions: this.models};\r
+    param.signature = this.getModelSignature(innerType, this.models).toString();\r
+    param.sampleJSON = this.getModelSampleJSON(innerType, this.models);\r
+    param.responseClassSignature = param.signature;\r
+  }\r
+\r
+  var defaultResponseCode, response, responses = this.responses;\r
+\r
+  if (responses['200']) {\r
+    response = responses['200'];\r
+    defaultResponseCode = '200';\r
+  } else if (responses['201']) {\r
+    response = responses['201'];\r
+    defaultResponseCode = '201';\r
+  } else if (responses['202']) {\r
+    response = responses['202'];\r
+    defaultResponseCode = '202';\r
+  } else if (responses['203']) {\r
+    response = responses['203'];\r
+    defaultResponseCode = '203';\r
+  } else if (responses['204']) {\r
+    response = responses['204'];\r
+    defaultResponseCode = '204';\r
+  } else if (responses['205']) {\r
+    response = responses['205'];\r
+    defaultResponseCode = '205';\r
+  } else if (responses['206']) {\r
+    response = responses['206'];\r
+    defaultResponseCode = '206';\r
+  } else if (responses['default']) {\r
+    response = responses['default'];\r
+    defaultResponseCode = 'default';\r
+  }\r
+\r
+  if (response && response.schema) {\r
+    var resolvedModel = this.resolveModel(response.schema, definitions);\r
+    var successResponse;\r
+\r
+    delete responses[defaultResponseCode];\r
+\r
+    if (resolvedModel) {\r
+      this.successResponse = {};\r
+      successResponse = this.successResponse[defaultResponseCode] = resolvedModel;\r
+    } else if (!response.schema.type || response.schema.type === 'object' || response.schema.type === 'array') {\r
+      // Inline model\r
+      this.successResponse = {};\r
+      successResponse = this.successResponse[defaultResponseCode] = new Model(undefined, response.schema || {}, this.models, parent.modelPropertyMacro);\r
+    } else {\r
+      // Primitive\r
+      this.successResponse = {};\r
+      successResponse = this.successResponse[defaultResponseCode] = response.schema;\r
+    }\r
+\r
+    if (successResponse) {\r
+      // Attach response properties\r
+      if (response.description) {\r
+        successResponse.description = response.description;\r
+      }\r
+\r
+      if (response.examples) {\r
+        successResponse.examples = response.examples;\r
+      }\r
+\r
+      if (response.headers) {\r
+        successResponse.headers = response.headers;\r
+      }\r
+    }\r
+\r
+    this.type = response;\r
+  }\r
+\r
+  if (errors.length > 0) {\r
+    if (this.resource && this.resource.api && this.resource.api.fail) {\r
+      this.resource.api.fail(errors);\r
+    }\r
+  }\r
+\r
+  return this;\r
+};\r
+\r
+Operation.prototype.isDefaultArrayItemValue = function(value, param) {\r
+  if (param.default && Array.isArray(param.default)) {\r
+    return param.default.indexOf(value) !== -1;\r
+  }\r
+  return value === param.default;\r
+};\r
+\r
+Operation.prototype.getType = function (param) {\r
+  var type = param.type;\r
+  var format = param.format;\r
+  var isArray = false;\r
+  var str;\r
+\r
+  if (type === 'integer' && format === 'int32') {\r
+    str = 'integer';\r
+  } else if (type === 'integer' && format === 'int64') {\r
+    str = 'long';\r
+  } else if (type === 'integer') {\r
+    str = 'integer';\r
+  } else if (type === 'string') {\r
+    if (format === 'date-time') {\r
+      str = 'date-time';\r
+    } else if (format === 'date') {\r
+      str = 'date';\r
+    } else {\r
+      str = 'string';\r
+    }\r
+  } else if (type === 'number' && format === 'float') {\r
+    str = 'float';\r
+  } else if (type === 'number' && format === 'double') {\r
+    str = 'double';\r
+  } else if (type === 'number') {\r
+    str = 'double';\r
+  } else if (type === 'boolean') {\r
+    str = 'boolean';\r
+  } else if (type === 'array') {\r
+    isArray = true;\r
+\r
+    if (param.items) {\r
+      str = this.getType(param.items);\r
+    }\r
+  } else if (type === 'file') {\r
+    str = 'file';\r
+  }\r
+\r
+  if (param.$ref) {\r
+    str = helpers.simpleRef(param.$ref);\r
+  }\r
+\r
+  var schema = param.schema;\r
+\r
+  if (schema) {\r
+    var ref = schema.$ref;\r
+\r
+    if (ref) {\r
+      ref = helpers.simpleRef(ref);\r
+\r
+      if (isArray) {\r
+        return [ ref ];\r
+      } else {\r
+        return ref;\r
+      }\r
+    } else {\r
+      // If inline schema, we add it our interal hash -> which gives us it's ID (int)\r
+      if(schema.type === 'object') {\r
+        return this.addInlineModel(schema);\r
+      }\r
+      return this.getType(schema);\r
+    }\r
+  }\r
+  if (isArray) {\r
+    return [ str ];\r
+  } else {\r
+    return str;\r
+  }\r
+};\r
+\r
+/**\r
+ * adds an inline schema (model) to a hash, where we can ref it later\r
+ * @param {object} schema a schema\r
+ * @return {number} the ID of the schema being added, or null\r
+ **/\r
+Operation.prototype.addInlineModel = function (schema) {\r
+  var len = this.inlineModels.length;\r
+  var model = this.resolveModel(schema, {});\r
+  if(model) {\r
+    this.inlineModels.push(model);\r
+    return 'Inline Model '+len; // return string ref of the inline model (used with #getInlineModel)\r
+  }\r
+  return null; // report errors?\r
+};\r
+\r
+/**\r
+ * gets the internal ref to an inline model\r
+ * @param {string} inline_str a string reference to an inline model\r
+ * @return {Model} the model being referenced. Or null\r
+ **/\r
+Operation.prototype.getInlineModel = function(inlineStr) {\r
+  if(/^Inline Model \d+$/.test(inlineStr)) {\r
+    var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); //\r
+    var model = this.inlineModels[id];\r
+    return model;\r
+  }\r
+  // I'm returning null here, should I rather throw an error?\r
+  return null;\r
+};\r
+\r
+Operation.prototype.resolveModel = function (schema, definitions) {\r
+  if (typeof schema.$ref !== 'undefined') {\r
+    var ref = schema.$ref;\r
+\r
+    if (ref.indexOf('#/definitions/') === 0) {\r
+      ref = ref.substring('#/definitions/'.length);\r
+    }\r
+\r
+    if (definitions[ref]) {\r
+      return new Model(ref, definitions[ref], this.models, this.parent.modelPropertyMacro);\r
+    }\r
+  // schema must at least be an object to get resolved to an inline Model\r
+  } else if (schema && typeof schema === 'object' &&\r
+            (schema.type === 'object' || _.isUndefined(schema.type))) {\r
+    return new Model(undefined, schema, this.models, this.parent.modelPropertyMacro);\r
+  }\r
+\r
+  return null;\r
+};\r
+\r
+Operation.prototype.help = function (dontPrint) {\r
+  var out = this.nickname + ': ' + this.summary + '\n';\r
+\r
+  for (var i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+    var typeInfo = param.signature;\r
+\r
+    out += '\n  * ' + param.name + ' (' + typeInfo + '): ' + param.description;\r
+  }\r
+\r
+  if (typeof dontPrint === 'undefined') {\r
+    helpers.log(out);\r
+  }\r
+\r
+  return out;\r
+};\r
+\r
+Operation.prototype.getModelSignature = function (type, definitions) {\r
+  var isPrimitive, listType;\r
+\r
+  if (type instanceof Array) {\r
+    listType = true;\r
+    type = type[0];\r
+  }\r
+\r
+  // Convert undefined to string of 'undefined'\r
+  if (typeof type === 'undefined') {\r
+    type = 'undefined';\r
+    isPrimitive = true;\r
+\r
+  } else if (definitions[type]){\r
+    // a model def exists?\r
+    type = definitions[type]; /* Model */\r
+    isPrimitive = false;\r
+\r
+  } else if (this.getInlineModel(type)) {\r
+    type = this.getInlineModel(type); /* Model */\r
+    isPrimitive = false;\r
+\r
+  } else {\r
+    // We default to primitive\r
+    isPrimitive = true;\r
+  }\r
+\r
+  if (isPrimitive) {\r
+    if (listType) {\r
+      return 'Array[' + type + ']';\r
+    } else {\r
+      return type.toString();\r
+    }\r
+  } else {\r
+    if (listType) {\r
+      return 'Array[' + type.getMockSignature() + ']';\r
+    } else {\r
+      return type.getMockSignature();\r
+    }\r
+  }\r
+};\r
+\r
+Operation.prototype.supportHeaderParams = function () {\r
+  return true;\r
+};\r
+\r
+Operation.prototype.supportedSubmitMethods = function () {\r
+  return this.parent.supportedSubmitMethods;\r
+};\r
+\r
+Operation.prototype.getHeaderParams = function (args) {\r
+  var headers = this.setContentTypes(args, {});\r
+\r
+  for (var i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+\r
+    if (typeof args[param.name] !== 'undefined') {\r
+      if (param.in === 'header') {\r
+        var value = args[param.name];\r
+\r
+        if (Array.isArray(value)) {\r
+          value = value.toString();\r
+        }\r
+\r
+        headers[param.name] = value;\r
+      }\r
+    }\r
+  }\r
+\r
+  return headers;\r
+};\r
+\r
+Operation.prototype.urlify = function (args) {\r
+  var formParams = {};\r
+  var requestUrl = this.path;\r
+  var querystring = ''; // grab params from the args, build the querystring along the way\r
+\r
+  for (var i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+\r
+    if (typeof args[param.name] !== 'undefined') {\r
+      if (param.in === 'path') {\r
+        var reg = new RegExp('\{' + param.name + '\}', 'gi');\r
+        var value = args[param.name];\r
+\r
+        if (Array.isArray(value)) {\r
+          value = this.encodePathCollection(param.collectionFormat, param.name, value);\r
+        } else {\r
+          value = this.encodePathParam(value);\r
+        }\r
+\r
+        requestUrl = requestUrl.replace(reg, value);\r
+      } else if (param.in === 'query' && typeof args[param.name] !== 'undefined') {\r
+        if (querystring === '') {\r
+          querystring += '?';\r
+        } else {\r
+          querystring += '&';\r
+        }\r
+\r
+        if (typeof param.collectionFormat !== 'undefined') {\r
+          var qp = args[param.name];\r
+\r
+          if (Array.isArray(qp)) {\r
+            querystring += this.encodeQueryCollection(param.collectionFormat, param.name, qp);\r
+          } else {\r
+            querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);\r
+          }\r
+        } else {\r
+          querystring += this.encodeQueryParam(param.name) + '=' + this.encodeQueryParam(args[param.name]);\r
+        }\r
+      } else if (param.in === 'formData') {\r
+        formParams[param.name] = args[param.name];\r
+      }\r
+    }\r
+  }\r
+  var url = this.scheme + '://' + this.host;\r
+\r
+  if (this.basePath !== '/') {\r
+    url += this.basePath;\r
+  }\r
+  return url + requestUrl + querystring;\r
+};\r
+\r
+Operation.prototype.getMissingParams = function (args) {\r
+  var missingParams = []; // check required params, track the ones that are missing\r
+  var i;\r
+\r
+  for (i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+\r
+    if (param.required === true) {\r
+      if (typeof args[param.name] === 'undefined') {\r
+        missingParams = param.name;\r
+      }\r
+    }\r
+  }\r
+\r
+  return missingParams;\r
+};\r
+\r
+Operation.prototype.getBody = function (headers, args, opts) {\r
+  var formParams = {}, hasFormParams, body, key, value, hasBody = false;\r
+\r
+  // look at each param and put form params in an object\r
+  for (var i = 0; i < this.parameters.length; i++) {\r
+    var param = this.parameters[i];\r
+    if (typeof args[param.name] !== 'undefined') {\r
+      if (param.in === 'body') {\r
+        body = args[param.name];\r
+      } else if (param.in === 'formData') {\r
+        formParams[param.name] = args[param.name];\r
+        hasFormParams = true;\r
+      }\r
+    }\r
+    else {\r
+      if(param.in === 'body') {\r
+        hasBody = true;\r
+      }\r
+    }\r
+  }\r
+\r
+  // if body is null and hasBody is true, AND a JSON body is requested, send empty {}\r
+  if(hasBody && typeof body === 'undefined') {\r
+    var contentType = headers['Content-Type'];\r
+    if(contentType && contentType.indexOf('application/json') === 0) {\r
+      body = '{}';\r
+    }\r
+  }\r
+\r
+  var isMultiPart = false;\r
+  if(headers['Content-Type'] && headers['Content-Type'].indexOf('multipart/form-data') >= 0) {\r
+    isMultiPart = true;\r
+  }\r
+\r
+  // handle form params\r
+  if (hasFormParams && !isMultiPart) {\r
+    var encoded = '';\r
+\r
+    for (key in formParams) {\r
+      value = formParams[key];\r
+\r
+      if (typeof value !== 'undefined') {\r
+        if (encoded !== '') {\r
+          encoded += '&';\r
+        }\r
+\r
+        encoded += encodeURIComponent(key) + '=' + encodeURIComponent(value);\r
+      }\r
+    }\r
+\r
+    body = encoded;\r
+  } else if (isMultiPart) {\r
+    if (opts.useJQuery) {\r
+      var bodyParam = new FormData();\r
+\r
+      bodyParam.type = 'formData';\r
+\r
+      for (key in formParams) {\r
+        value = args[key];\r
+\r
+        if (typeof value !== 'undefined') {\r
+          // required for jquery file upload\r
+          if (value.type === 'file' && value.value) {\r
+            delete headers['Content-Type'];\r
+\r
+            bodyParam.append(key, value.value);\r
+          } else {\r
+            bodyParam.append(key, value);\r
+          }\r
+        }\r
+      }\r
+\r
+      body = bodyParam;\r
+    }\r
+  }\r
+\r
+  return body;\r
+};\r
+\r
+/**\r
+ * gets sample response for a single operation\r
+ **/\r
+Operation.prototype.getModelSampleJSON = function (type, models) {\r
+  var listType, sampleJson, innerType;\r
+  models = models || {};\r
+\r
+  listType = (type instanceof Array);\r
+  innerType = listType ? type[0] : type;\r
+\r
+  if(models[innerType]) {\r
+    sampleJson = models[innerType].createJSONSample();\r
+  } else if (this.getInlineModel(innerType)){\r
+    sampleJson = this.getInlineModel(innerType).createJSONSample(); // may return null, if type isn't correct\r
+  }\r
+\r
+\r
+  if (sampleJson) {\r
+    sampleJson = listType ? [sampleJson] : sampleJson;\r
+\r
+    if (typeof sampleJson === 'string') {\r
+      return sampleJson;\r
+    } else if (_.isObject(sampleJson)) {\r
+      var t = sampleJson;\r
+\r
+      if (sampleJson instanceof Array && sampleJson.length > 0) {\r
+        t = sampleJson[0];\r
+      }\r
+\r
+      if (t.nodeName && typeof t === 'Node') {\r
+        var xmlString = new XMLSerializer().serializeToString(t);\r
+\r
+        return this.formatXml(xmlString);\r
+      } else {\r
+        return JSON.stringify(sampleJson, null, 2);\r
+      }\r
+    } else {\r
+      return sampleJson;\r
+    }\r
+  }\r
+};\r
+\r
+/**\r
+ * legacy binding\r
+ **/\r
+Operation.prototype.do = function (args, opts, callback, error, parent) {\r
+  return this.execute(args, opts, callback, error, parent);\r
+};\r
+\r
+/**\r
+ * executes an operation\r
+ **/\r
+Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) {\r
+  var args = arg1 || {};\r
+  var opts = {}, success, error, deferred;\r
+\r
+  if (_.isObject(arg2)) {\r
+    opts = arg2;\r
+    success = arg3;\r
+    error = arg4;\r
+  }\r
+\r
+  if(this.client) {\r
+    opts.client = this.client;\r
+  }\r
+\r
+  // add the request interceptor from parent, if none sent from client\r
+  if(!opts.requestInterceptor && this.requestInterceptor ) {\r
+    opts.requestInterceptor = this.requestInterceptor ;\r
+  }\r
+\r
+  if(!opts.responseInterceptor && this.responseInterceptor) {\r
+    opts.responseInterceptor = this.responseInterceptor;\r
+  }\r
+\r
+  if (typeof arg2 === 'function') {\r
+    success = arg2;\r
+    error = arg3;\r
+  }\r
+\r
+  if (this.parent.usePromise) {\r
+    deferred = Q.defer();\r
+  } else {\r
+    success = (success || this.parent.defaultSuccessCallback || helpers.log);\r
+    error = (error || this.parent.defaultErrorCallback || helpers.log);\r
+  }\r
+\r
+\r
+  if (typeof opts.useJQuery === 'undefined') {\r
+    opts.useJQuery = this.useJQuery;\r
+  }\r
+\r
+  if (typeof opts.enableCookies === 'undefined') {\r
+    opts.enableCookies = this.enableCookies;\r
+  }\r
+\r
+  var missingParams = this.getMissingParams(args);\r
+\r
+  if (missingParams.length > 0) {\r
+    var message = 'missing required params: ' + missingParams;\r
+\r
+    helpers.fail(message);\r
+\r
+    if (this.parent.usePromise) {\r
+      deferred.reject(message);\r
+      return deferred.promise;\r
+    } else {\r
+      error(message, parent);\r
+      return {};\r
+    }\r
+  }\r
+\r
+  var allHeaders = this.getHeaderParams(args);\r
+  var contentTypeHeaders = this.setContentTypes(args, opts);\r
+  var headers = {}, attrname;\r
+\r
+  for (attrname in allHeaders) { headers[attrname] = allHeaders[attrname]; }\r
+  for (attrname in contentTypeHeaders) { headers[attrname] = contentTypeHeaders[attrname]; }\r
+\r
+  var body = this.getBody(contentTypeHeaders, args, opts);\r
+  var url = this.urlify(args);\r
+\r
+  if(url.indexOf('.{format}') > 0) {\r
+    if(headers) {\r
+      var format = headers.Accept || headers.accept;\r
+      if(format && format.indexOf('json') > 0) {\r
+        url = url.replace('.{format}', '.json');\r
+      }\r
+      else if(format && format.indexOf('xml') > 0) {\r
+        url = url.replace('.{format}', '.xml');\r
+      }\r
+    }\r
+  }\r
+\r
+  var obj = {\r
+    url: url,\r
+    method: this.method.toUpperCase(),\r
+    body: body,\r
+    enableCookies: opts.enableCookies,\r
+    useJQuery: opts.useJQuery,\r
+    deferred: deferred,\r
+    headers: headers,\r
+    clientAuthorizations: opts.clientAuthorizations,\r
+    on: {\r
+      response: function (response) {\r
+        if (deferred) {\r
+          deferred.resolve(response);\r
+          return deferred.promise;\r
+        } else {\r
+          return success(response, parent);\r
+        }\r
+      },\r
+      error: function (response) {\r
+        if (deferred) {\r
+          deferred.reject(response);\r
+          return deferred.promise;\r
+        } else {\r
+          return error(response, parent);\r
+        }\r
+      }\r
+    }\r
+  };\r
+\r
+  this.clientAuthorizations.apply(obj, this.operation.security);\r
+  if (opts.mock === true) {\r
+    return obj;\r
+  } else {\r
+    return new SwaggerHttp().execute(obj, opts);\r
+  }\r
+};\r
+\r
+function itemByPriority(col, itemPriority) {\r
+\r
+  // No priorities? return first...\r
+  if(_.isEmpty(itemPriority)) {\r
+    return col[0];\r
+  }\r
+\r
+  for (var i = 0, len = itemPriority.length; i < len; i++) {\r
+    if(col.indexOf(itemPriority[i]) > -1) {\r
+      return itemPriority[i];\r
+    }\r
+  }\r
+\r
+  // Otherwise return first\r
+  return col[0];\r
+}\r
+\r
+Operation.prototype.setContentTypes = function (args, opts) {\r
+  // default type\r
+  var allDefinedParams = this.parameters;\r
+  var body;\r
+  var consumes = args.parameterContentType || itemByPriority(this.consumes, ['application/json', 'application/yaml']);\r
+  var accepts = opts.responseContentType || itemByPriority(this.produces, ['application/json', 'application/yaml']);\r
+  var definedFileParams = [];\r
+  var definedFormParams = [];\r
+  var headers = {};\r
+  var i;\r
+\r
+  // get params from the operation and set them in definedFileParams, definedFormParams, headers\r
+  for (i = 0; i < allDefinedParams.length; i++) {\r
+    var param = allDefinedParams[i];\r
+\r
+    if (param.in === 'formData') {\r
+      if (param.type === 'file') {\r
+        definedFileParams.push(param);\r
+      } else {\r
+        definedFormParams.push(param);\r
+      }\r
+    } else if (param.in === 'header' && opts) {\r
+      var key = param.name;\r
+      var headerValue = opts[param.name];\r
+\r
+      if (typeof opts[param.name] !== 'undefined') {\r
+        headers[key] = headerValue;\r
+      }\r
+    } else if (param.in === 'body' && typeof args[param.name] !== 'undefined') {\r
+      body = args[param.name];\r
+    }\r
+  }\r
+\r
+  // if there's a body, need to set the consumes header via requestContentType\r
+  if (this.method === 'post' || this.method === 'put' || this.method === 'patch' ||\r
+      ((this.method === 'delete' || this.method === 'get') && body) ) {\r
+    if (opts.requestContentType) {\r
+      consumes = opts.requestContentType;\r
+    }\r
+    // if any form params, content type must be set\r
+    if (definedFormParams.length > 0) {\r
+      if (opts.requestContentType) {             // override if set\r
+        consumes = opts.requestContentType;\r
+      } else if (definedFileParams.length > 0) { // if a file, must be multipart/form-data\r
+        consumes = 'multipart/form-data';\r
+      } else {                                   // default to x-www-from-urlencoded\r
+        consumes = 'application/x-www-form-urlencoded';\r
+      }\r
+    }\r
+  }\r
+  else {\r
+    consumes = null;\r
+  }\r
+\r
+  if (consumes && this.consumes) {\r
+    if (this.consumes.indexOf(consumes) === -1) {\r
+      helpers.log('server doesn\'t consume ' + consumes + ', try ' + JSON.stringify(this.consumes));\r
+    }\r
+  }\r
+\r
+  if (!this.matchesAccept(accepts)) {\r
+    helpers.log('server can\'t produce ' + accepts);\r
+  }\r
+\r
+  if ((consumes && body !== '') || (consumes === 'application/x-www-form-urlencoded')) {\r
+    headers['Content-Type'] = consumes;\r
+  }\r
+\r
+  if (accepts) {\r
+    headers.Accept = accepts;\r
+  }\r
+\r
+  return headers;\r
+};\r
+\r
+/**\r
+ * Returns true if the request accepts header matches anything in this.produces.\r
+ *  If this.produces contains * / *, ignore the accept header.\r
+ * @param {string=} accepts The client request accept header.\r
+ * @return {boolean}\r
+ */\r
+Operation.prototype.matchesAccept = function(accepts) {\r
+  // no accepts or produces, no problem!\r
+  if (!accepts || !this.produces) {\r
+    return true;\r
+  }\r
+  return this.produces.indexOf(accepts) !== -1 || this.produces.indexOf('*/*') !== -1;\r
+};\r
+\r
+Operation.prototype.asCurl = function (args1, args2) {\r
+  var opts = {mock: true};\r
+  if (typeof args2 === 'object') {\r
+    for (var argKey in args2) {\r
+      opts[argKey] = args2[argKey];\r
+    }\r
+  }\r
+  var obj = this.execute(args1, opts);\r
+\r
+  this.clientAuthorizations.apply(obj, this.operation.security);\r
+\r
+  var results = [];\r
+\r
+  results.push('-X ' + this.method.toUpperCase());\r
+\r
+  if (typeof obj.headers !== 'undefined') {\r
+    var key;\r
+\r
+    for (key in obj.headers) {\r
+      var value = obj.headers[key];\r
+      if(typeof value === 'string'){\r
+        value = value.replace(/\'/g, '\\u0027');\r
+      }\r
+      results.push('--header \'' + key + ': ' + value + '\'');\r
+    }\r
+  }\r
+\r
+  if (obj.body) {\r
+    var body;\r
+\r
+    if (_.isObject(obj.body)) {\r
+      body = JSON.stringify(obj.body);\r
+    } else {\r
+      body = obj.body;\r
+    }\r
+\r
+    results.push('-d \'' + body.replace(/\'/g, '\\u0027') + '\'');\r
+  }\r
+\r
+  return 'curl ' + (results.join(' ')) + ' \'' + obj.url + '\'';\r
+};\r
+\r
+Operation.prototype.encodePathCollection = function (type, name, value) {\r
+  var encoded = '';\r
+  var i;\r
+  var separator = '';\r
+\r
+  if (type === 'ssv') {\r
+    separator = '%20';\r
+  } else if (type === 'tsv') {\r
+    separator = '\\t';\r
+  } else if (type === 'pipes') {\r
+    separator = '|';\r
+  } else {\r
+    separator = ',';\r
+  }\r
+\r
+  for (i = 0; i < value.length; i++) {\r
+    if (i === 0) {\r
+      encoded = this.encodeQueryParam(value[i]);\r
+    } else {\r
+      encoded += separator + this.encodeQueryParam(value[i]);\r
+    }\r
+  }\r
+\r
+  return encoded;\r
+};\r
+\r
+Operation.prototype.encodeQueryCollection = function (type, name, value) {\r
+  var encoded = '';\r
+  var i;\r
+\r
+  if (type === 'default' || type === 'multi') {\r
+    for (i = 0; i < value.length; i++) {\r
+      if (i > 0) {encoded += '&';}\r
+\r
+      encoded += this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]);\r
+    }\r
+  } else {\r
+    var separator = '';\r
+\r
+    if (type === 'csv') {\r
+      separator = ',';\r
+    } else if (type === 'ssv') {\r
+      separator = '%20';\r
+    } else if (type === 'tsv') {\r
+      separator = '\\t';\r
+    } else if (type === 'pipes') {\r
+      separator = '|';\r
+    } else if (type === 'brackets') {\r
+      for (i = 0; i < value.length; i++) {\r
+        if (i !== 0) {\r
+          encoded += '&';\r
+        }\r
+\r
+        encoded += this.encodeQueryParam(name) + '[]=' + this.encodeQueryParam(value[i]);\r
+      }\r
+    }\r
+\r
+    if (separator !== '') {\r
+      for (i = 0; i < value.length; i++) {\r
+        if (i === 0) {\r
+          encoded = this.encodeQueryParam(name) + '=' + this.encodeQueryParam(value[i]);\r
+        } else {\r
+          encoded += separator + this.encodeQueryParam(value[i]);\r
+        }\r
+      }\r
+    }\r
+  }\r
+\r
+  return encoded;\r
+};\r
+\r
+Operation.prototype.encodeQueryParam = function (arg) {\r
+  return encodeURIComponent(arg);\r
+};\r
+\r
+/**\r
+ * TODO revisit, might not want to leave '/'\r
+ **/\r
+Operation.prototype.encodePathParam = function (pathParam) {\r
+  return encodeURIComponent(pathParam);\r
+};\r
+\r
+},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isEmpty":143,"lodash-compat/lang/isObject":146,"lodash-compat/lang/isUndefined":150,"q":159}],11:[function(require,module,exports){\r
+'use strict';\r
+\r
+var OperationGroup = module.exports = function (tag, description, externalDocs, operation) {\r
+  this.description = description;\r
+  this.externalDocs = externalDocs;\r
+  this.name = tag;\r
+  this.operation = operation;\r
+  this.operationsArray = [];\r
+  this.path = tag;\r
+  this.tag = tag;\r
+};\r
+\r
+OperationGroup.prototype.sort = function () {\r
+\r
+};\r
+\r
+\r
+},{}],12:[function(require,module,exports){\r
+\r
+},{}],13:[function(require,module,exports){\r
+// shim for using process in browser\r
+\r
+var process = module.exports = {};\r
+var queue = [];\r
+var draining = false;\r
+\r
+function drainQueue() {\r
+    if (draining) {\r
+        return;\r
+    }\r
+    draining = true;\r
+    var currentQueue;\r
+    var len = queue.length;\r
+    while(len) {\r
+        currentQueue = queue;\r
+        queue = [];\r
+        var i = -1;\r
+        while (++i < len) {\r
+            currentQueue[i]();\r
+        }\r
+        len = queue.length;\r
+    }\r
+    draining = false;\r
+}\r
+process.nextTick = function (fun) {\r
+    queue.push(fun);\r
+    if (!draining) {\r
+        setTimeout(drainQueue, 0);\r
+    }\r
+};\r
+\r
+process.title = 'browser';\r
+process.browser = true;\r
+process.env = {};\r
+process.argv = [];\r
+process.version = ''; // empty string to avoid regexp issues\r
+process.versions = {};\r
+\r
+function noop() {}\r
+\r
+process.on = noop;\r
+process.addListener = noop;\r
+process.once = noop;\r
+process.off = noop;\r
+process.removeListener = noop;\r
+process.removeAllListeners = noop;\r
+process.emit = noop;\r
+\r
+process.binding = function (name) {\r
+    throw new Error('process.binding is not supported');\r
+};\r
+\r
+// TODO(shtylman)\r
+process.cwd = function () { return '/' };\r
+process.chdir = function (dir) {\r
+    throw new Error('process.chdir is not supported');\r
+};\r
+process.umask = function() { return 0; };\r
+\r
+},{}],14:[function(require,module,exports){\r
+(function (Buffer){\r
+(function () {\r
+  "use strict";\r
+\r
+  function btoa(str) {\r
+    var buffer\r
+      ;\r
+\r
+    if (str instanceof Buffer) {\r
+      buffer = str;\r
+    } else {\r
+      buffer = new Buffer(str.toString(), 'binary');\r
+    }\r
+\r
+    return buffer.toString('base64');\r
+  }\r
+\r
+  module.exports = btoa;\r
+}());\r
+\r
+}).call(this,require("buffer").Buffer)\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQSIsImZpbGUiOiJnZW5lcmF0ZWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlc0NvbnRlbnQiOlsiKGZ1bmN0aW9uICgpIHtcbiAgXCJ1c2Ugc3RyaWN0XCI7XG5cbiAgZnVuY3Rpb24gYnRvYShzdHIpIHtcbiAgICB2YXIgYnVmZmVyXG4gICAgICA7XG5cbiAgICBpZiAoc3RyIGluc3RhbmNlb2YgQnVmZmVyKSB7XG4gICAgICBidWZmZXIgPSBzdHI7XG4gICAgfSBlbHNlIHtcbiAgICAgIGJ1ZmZlciA9IG5ldyBCdWZmZXIoc3RyLnRvU3RyaW5nKCksICdiaW5hcnknKTtcbiAgICB9XG5cbiAgICByZXR1cm4gYnVmZmVyLnRvU3RyaW5nKCdiYXNlNjQnKTtcbiAgfVxuXG4gIG1vZHVsZS5leHBvcnRzID0gYnRvYTtcbn0oKSk7XG4iXX0=\r
+},{"buffer":15}],15:[function(require,module,exports){\r
+/*!\r
+ * The buffer module from node.js, for the browser.\r
+ *\r
+ * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\r
+ * @license  MIT\r
+ */\r
+\r
+var base64 = require('base64-js')\r
+var ieee754 = require('ieee754')\r
+var isArray = require('is-array')\r
+\r
+exports.Buffer = Buffer\r
+exports.SlowBuffer = SlowBuffer\r
+exports.INSPECT_MAX_BYTES = 50\r
+Buffer.poolSize = 8192 // not used by this implementation\r
+\r
+var rootParent = {}\r
+\r
+/**\r
+ * If `Buffer.TYPED_ARRAY_SUPPORT`:\r
+ *   === true    Use Uint8Array implementation (fastest)\r
+ *   === false   Use Object implementation (most compatible, even IE6)\r
+ *\r
+ * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\r
+ * Opera 11.6+, iOS 4.2+.\r
+ *\r
+ * Due to various browser bugs, sometimes the Object implementation will be used even\r
+ * when the browser supports typed arrays.\r
+ *\r
+ * Note:\r
+ *\r
+ *   - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,\r
+ *     See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.\r
+ *\r
+ *   - Safari 5-7 lacks support for changing the `Object.prototype.constructor` property\r
+ *     on objects.\r
+ *\r
+ *   - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.\r
+ *\r
+ *   - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of\r
+ *     incorrect length in some situations.\r
+\r
+ * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they\r
+ * get the Object implementation, which is slower but behaves correctly.\r
+ */\r
+Buffer.TYPED_ARRAY_SUPPORT = (function () {\r
+  function Bar () {}\r
+  try {\r
+    var arr = new Uint8Array(1)\r
+    arr.foo = function () { return 42 }\r
+    arr.constructor = Bar\r
+    return arr.foo() === 42 && // typed array instances can be augmented\r
+        arr.constructor === Bar && // constructor can be set\r
+        typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`\r
+        arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`\r
+  } catch (e) {\r
+    return false\r
+  }\r
+})()\r
+\r
+function kMaxLength () {\r
+  return Buffer.TYPED_ARRAY_SUPPORT\r
+    ? 0x7fffffff\r
+    : 0x3fffffff\r
+}\r
+\r
+/**\r
+ * Class: Buffer\r
+ * =============\r
+ *\r
+ * The Buffer constructor returns instances of `Uint8Array` that are augmented\r
+ * with function properties for all the node `Buffer` API functions. We use\r
+ * `Uint8Array` so that square bracket notation works as expected -- it returns\r
+ * a single octet.\r
+ *\r
+ * By augmenting the instances, we can avoid modifying the `Uint8Array`\r
+ * prototype.\r
+ */\r
+function Buffer (arg) {\r
+  if (!(this instanceof Buffer)) {\r
+    // Avoid going through an ArgumentsAdaptorTrampoline in the common case.\r
+    if (arguments.length > 1) return new Buffer(arg, arguments[1])\r
+    return new Buffer(arg)\r
+  }\r
+\r
+  this.length = 0\r
+  this.parent = undefined\r
+\r
+  // Common case.\r
+  if (typeof arg === 'number') {\r
+    return fromNumber(this, arg)\r
+  }\r
+\r
+  // Slightly less common case.\r
+  if (typeof arg === 'string') {\r
+    return fromString(this, arg, arguments.length > 1 ? arguments[1] : 'utf8')\r
+  }\r
+\r
+  // Unusual.\r
+  return fromObject(this, arg)\r
+}\r
+\r
+function fromNumber (that, length) {\r
+  that = allocate(that, length < 0 ? 0 : checked(length) | 0)\r
+  if (!Buffer.TYPED_ARRAY_SUPPORT) {\r
+    for (var i = 0; i < length; i++) {\r
+      that[i] = 0\r
+    }\r
+  }\r
+  return that\r
+}\r
+\r
+function fromString (that, string, encoding) {\r
+  if (typeof encoding !== 'string' || encoding === '') encoding = 'utf8'\r
+\r
+  // Assumption: byteLength() return value is always < kMaxLength.\r
+  var length = byteLength(string, encoding) | 0\r
+  that = allocate(that, length)\r
+\r
+  that.write(string, encoding)\r
+  return that\r
+}\r
+\r
+function fromObject (that, object) {\r
+  if (Buffer.isBuffer(object)) return fromBuffer(that, object)\r
+\r
+  if (isArray(object)) return fromArray(that, object)\r
+\r
+  if (object == null) {\r
+    throw new TypeError('must start with number, buffer, array or string')\r
+  }\r
+\r
+  if (typeof ArrayBuffer !== 'undefined') {\r
+    if (object.buffer instanceof ArrayBuffer) {\r
+      return fromTypedArray(that, object)\r
+    }\r
+    if (object instanceof ArrayBuffer) {\r
+      return fromArrayBuffer(that, object)\r
+    }\r
+  }\r
+\r
+  if (object.length) return fromArrayLike(that, object)\r
+\r
+  return fromJsonObject(that, object)\r
+}\r
+\r
+function fromBuffer (that, buffer) {\r
+  var length = checked(buffer.length) | 0\r
+  that = allocate(that, length)\r
+  buffer.copy(that, 0, 0, length)\r
+  return that\r
+}\r
+\r
+function fromArray (that, array) {\r
+  var length = checked(array.length) | 0\r
+  that = allocate(that, length)\r
+  for (var i = 0; i < length; i += 1) {\r
+    that[i] = array[i] & 255\r
+  }\r
+  return that\r
+}\r
+\r
+// Duplicate of fromArray() to keep fromArray() monomorphic.\r
+function fromTypedArray (that, array) {\r
+  var length = checked(array.length) | 0\r
+  that = allocate(that, length)\r
+  // Truncating the elements is probably not what people expect from typed\r
+  // arrays with BYTES_PER_ELEMENT > 1 but it's compatible with the behavior\r
+  // of the old Buffer constructor.\r
+  for (var i = 0; i < length; i += 1) {\r
+    that[i] = array[i] & 255\r
+  }\r
+  return that\r
+}\r
+\r
+function fromArrayBuffer (that, array) {\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    // Return an augmented `Uint8Array` instance, for best performance\r
+    array.byteLength\r
+    that = Buffer._augment(new Uint8Array(array))\r
+  } else {\r
+    // Fallback: Return an object instance of the Buffer class\r
+    that = fromTypedArray(that, new Uint8Array(array))\r
+  }\r
+  return that\r
+}\r
+\r
+function fromArrayLike (that, array) {\r
+  var length = checked(array.length) | 0\r
+  that = allocate(that, length)\r
+  for (var i = 0; i < length; i += 1) {\r
+    that[i] = array[i] & 255\r
+  }\r
+  return that\r
+}\r
+\r
+// Deserialize { type: 'Buffer', data: [1,2,3,...] } into a Buffer object.\r
+// Returns a zero-length buffer for inputs that don't conform to the spec.\r
+function fromJsonObject (that, object) {\r
+  var array\r
+  var length = 0\r
+\r
+  if (object.type === 'Buffer' && isArray(object.data)) {\r
+    array = object.data\r
+    length = checked(array.length) | 0\r
+  }\r
+  that = allocate(that, length)\r
+\r
+  for (var i = 0; i < length; i += 1) {\r
+    that[i] = array[i] & 255\r
+  }\r
+  return that\r
+}\r
+\r
+function allocate (that, length) {\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    // Return an augmented `Uint8Array` instance, for best performance\r
+    that = Buffer._augment(new Uint8Array(length))\r
+  } else {\r
+    // Fallback: Return an object instance of the Buffer class\r
+    that.length = length\r
+    that._isBuffer = true\r
+  }\r
+\r
+  var fromPool = length !== 0 && length <= Buffer.poolSize >>> 1\r
+  if (fromPool) that.parent = rootParent\r
+\r
+  return that\r
+}\r
+\r
+function checked (length) {\r
+  // Note: cannot use `length < kMaxLength` here because that fails when\r
+  // length is NaN (which is otherwise coerced to zero.)\r
+  if (length >= kMaxLength()) {\r
+    throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\r
+                         'size: 0x' + kMaxLength().toString(16) + ' bytes')\r
+  }\r
+  return length | 0\r
+}\r
+\r
+function SlowBuffer (subject, encoding) {\r
+  if (!(this instanceof SlowBuffer)) return new SlowBuffer(subject, encoding)\r
+\r
+  var buf = new Buffer(subject, encoding)\r
+  delete buf.parent\r
+  return buf\r
+}\r
+\r
+Buffer.isBuffer = function isBuffer (b) {\r
+  return !!(b != null && b._isBuffer)\r
+}\r
+\r
+Buffer.compare = function compare (a, b) {\r
+  if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\r
+    throw new TypeError('Arguments must be Buffers')\r
+  }\r
+\r
+  if (a === b) return 0\r
+\r
+  var x = a.length\r
+  var y = b.length\r
+\r
+  var i = 0\r
+  var len = Math.min(x, y)\r
+  while (i < len) {\r
+    if (a[i] !== b[i]) break\r
+\r
+    ++i\r
+  }\r
+\r
+  if (i !== len) {\r
+    x = a[i]\r
+    y = b[i]\r
+  }\r
+\r
+  if (x < y) return -1\r
+  if (y < x) return 1\r
+  return 0\r
+}\r
+\r
+Buffer.isEncoding = function isEncoding (encoding) {\r
+  switch (String(encoding).toLowerCase()) {\r
+    case 'hex':\r
+    case 'utf8':\r
+    case 'utf-8':\r
+    case 'ascii':\r
+    case 'binary':\r
+    case 'base64':\r
+    case 'raw':\r
+    case 'ucs2':\r
+    case 'ucs-2':\r
+    case 'utf16le':\r
+    case 'utf-16le':\r
+      return true\r
+    default:\r
+      return false\r
+  }\r
+}\r
+\r
+Buffer.concat = function concat (list, length) {\r
+  if (!isArray(list)) throw new TypeError('list argument must be an Array of Buffers.')\r
+\r
+  if (list.length === 0) {\r
+    return new Buffer(0)\r
+  }\r
+\r
+  var i\r
+  if (length === undefined) {\r
+    length = 0\r
+    for (i = 0; i < list.length; i++) {\r
+      length += list[i].length\r
+    }\r
+  }\r
+\r
+  var buf = new Buffer(length)\r
+  var pos = 0\r
+  for (i = 0; i < list.length; i++) {\r
+    var item = list[i]\r
+    item.copy(buf, pos)\r
+    pos += item.length\r
+  }\r
+  return buf\r
+}\r
+\r
+function byteLength (string, encoding) {\r
+  if (typeof string !== 'string') string = '' + string\r
+\r
+  var len = string.length\r
+  if (len === 0) return 0\r
+\r
+  // Use a for loop to avoid recursion\r
+  var loweredCase = false\r
+  for (;;) {\r
+    switch (encoding) {\r
+      case 'ascii':\r
+      case 'binary':\r
+      // Deprecated\r
+      case 'raw':\r
+      case 'raws':\r
+        return len\r
+      case 'utf8':\r
+      case 'utf-8':\r
+        return utf8ToBytes(string).length\r
+      case 'ucs2':\r
+      case 'ucs-2':\r
+      case 'utf16le':\r
+      case 'utf-16le':\r
+        return len * 2\r
+      case 'hex':\r
+        return len >>> 1\r
+      case 'base64':\r
+        return base64ToBytes(string).length\r
+      default:\r
+        if (loweredCase) return utf8ToBytes(string).length // assume utf8\r
+        encoding = ('' + encoding).toLowerCase()\r
+        loweredCase = true\r
+    }\r
+  }\r
+}\r
+Buffer.byteLength = byteLength\r
+\r
+// pre-set for values that may exist in the future\r
+Buffer.prototype.length = undefined\r
+Buffer.prototype.parent = undefined\r
+\r
+function slowToString (encoding, start, end) {\r
+  var loweredCase = false\r
+\r
+  start = start | 0\r
+  end = end === undefined || end === Infinity ? this.length : end | 0\r
+\r
+  if (!encoding) encoding = 'utf8'\r
+  if (start < 0) start = 0\r
+  if (end > this.length) end = this.length\r
+  if (end <= start) return ''\r
+\r
+  while (true) {\r
+    switch (encoding) {\r
+      case 'hex':\r
+        return hexSlice(this, start, end)\r
+\r
+      case 'utf8':\r
+      case 'utf-8':\r
+        return utf8Slice(this, start, end)\r
+\r
+      case 'ascii':\r
+        return asciiSlice(this, start, end)\r
+\r
+      case 'binary':\r
+        return binarySlice(this, start, end)\r
+\r
+      case 'base64':\r
+        return base64Slice(this, start, end)\r
+\r
+      case 'ucs2':\r
+      case 'ucs-2':\r
+      case 'utf16le':\r
+      case 'utf-16le':\r
+        return utf16leSlice(this, start, end)\r
+\r
+      default:\r
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\r
+        encoding = (encoding + '').toLowerCase()\r
+        loweredCase = true\r
+    }\r
+  }\r
+}\r
+\r
+Buffer.prototype.toString = function toString () {\r
+  var length = this.length | 0\r
+  if (length === 0) return ''\r
+  if (arguments.length === 0) return utf8Slice(this, 0, length)\r
+  return slowToString.apply(this, arguments)\r
+}\r
+\r
+Buffer.prototype.equals = function equals (b) {\r
+  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\r
+  if (this === b) return true\r
+  return Buffer.compare(this, b) === 0\r
+}\r
+\r
+Buffer.prototype.inspect = function inspect () {\r
+  var str = ''\r
+  var max = exports.INSPECT_MAX_BYTES\r
+  if (this.length > 0) {\r
+    str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')\r
+    if (this.length > max) str += ' ... '\r
+  }\r
+  return '<Buffer ' + str + '>'\r
+}\r
+\r
+Buffer.prototype.compare = function compare (b) {\r
+  if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\r
+  if (this === b) return 0\r
+  return Buffer.compare(this, b)\r
+}\r
+\r
+Buffer.prototype.indexOf = function indexOf (val, byteOffset) {\r
+  if (byteOffset > 0x7fffffff) byteOffset = 0x7fffffff\r
+  else if (byteOffset < -0x80000000) byteOffset = -0x80000000\r
+  byteOffset >>= 0\r
+\r
+  if (this.length === 0) return -1\r
+  if (byteOffset >= this.length) return -1\r
+\r
+  // Negative offsets start from the end of the buffer\r
+  if (byteOffset < 0) byteOffset = Math.max(this.length + byteOffset, 0)\r
+\r
+  if (typeof val === 'string') {\r
+    if (val.length === 0) return -1 // special case: looking for empty string always fails\r
+    return String.prototype.indexOf.call(this, val, byteOffset)\r
+  }\r
+  if (Buffer.isBuffer(val)) {\r
+    return arrayIndexOf(this, val, byteOffset)\r
+  }\r
+  if (typeof val === 'number') {\r
+    if (Buffer.TYPED_ARRAY_SUPPORT && Uint8Array.prototype.indexOf === 'function') {\r
+      return Uint8Array.prototype.indexOf.call(this, val, byteOffset)\r
+    }\r
+    return arrayIndexOf(this, [ val ], byteOffset)\r
+  }\r
+\r
+  function arrayIndexOf (arr, val, byteOffset) {\r
+    var foundIndex = -1\r
+    for (var i = 0; byteOffset + i < arr.length; i++) {\r
+      if (arr[byteOffset + i] === val[foundIndex === -1 ? 0 : i - foundIndex]) {\r
+        if (foundIndex === -1) foundIndex = i\r
+        if (i - foundIndex + 1 === val.length) return byteOffset + foundIndex\r
+      } else {\r
+        foundIndex = -1\r
+      }\r
+    }\r
+    return -1\r
+  }\r
+\r
+  throw new TypeError('val must be string, number or Buffer')\r
+}\r
+\r
+// `get` is deprecated\r
+Buffer.prototype.get = function get (offset) {\r
+  console.log('.get() is deprecated. Access using array indexes instead.')\r
+  return this.readUInt8(offset)\r
+}\r
+\r
+// `set` is deprecated\r
+Buffer.prototype.set = function set (v, offset) {\r
+  console.log('.set() is deprecated. Access using array indexes instead.')\r
+  return this.writeUInt8(v, offset)\r
+}\r
+\r
+function hexWrite (buf, string, offset, length) {\r
+  offset = Number(offset) || 0\r
+  var remaining = buf.length - offset\r
+  if (!length) {\r
+    length = remaining\r
+  } else {\r
+    length = Number(length)\r
+    if (length > remaining) {\r
+      length = remaining\r
+    }\r
+  }\r
+\r
+  // must be an even number of digits\r
+  var strLen = string.length\r
+  if (strLen % 2 !== 0) throw new Error('Invalid hex string')\r
+\r
+  if (length > strLen / 2) {\r
+    length = strLen / 2\r
+  }\r
+  for (var i = 0; i < length; i++) {\r
+    var parsed = parseInt(string.substr(i * 2, 2), 16)\r
+    if (isNaN(parsed)) throw new Error('Invalid hex string')\r
+    buf[offset + i] = parsed\r
+  }\r
+  return i\r
+}\r
+\r
+function utf8Write (buf, string, offset, length) {\r
+  return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\r
+}\r
+\r
+function asciiWrite (buf, string, offset, length) {\r
+  return blitBuffer(asciiToBytes(string), buf, offset, length)\r
+}\r
+\r
+function binaryWrite (buf, string, offset, length) {\r
+  return asciiWrite(buf, string, offset, length)\r
+}\r
+\r
+function base64Write (buf, string, offset, length) {\r
+  return blitBuffer(base64ToBytes(string), buf, offset, length)\r
+}\r
+\r
+function ucs2Write (buf, string, offset, length) {\r
+  return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\r
+}\r
+\r
+Buffer.prototype.write = function write (string, offset, length, encoding) {\r
+  // Buffer#write(string)\r
+  if (offset === undefined) {\r
+    encoding = 'utf8'\r
+    length = this.length\r
+    offset = 0\r
+  // Buffer#write(string, encoding)\r
+  } else if (length === undefined && typeof offset === 'string') {\r
+    encoding = offset\r
+    length = this.length\r
+    offset = 0\r
+  // Buffer#write(string, offset[, length][, encoding])\r
+  } else if (isFinite(offset)) {\r
+    offset = offset | 0\r
+    if (isFinite(length)) {\r
+      length = length | 0\r
+      if (encoding === undefined) encoding = 'utf8'\r
+    } else {\r
+      encoding = length\r
+      length = undefined\r
+    }\r
+  // legacy write(string, encoding, offset, length) - remove in v0.13\r
+  } else {\r
+    var swap = encoding\r
+    encoding = offset\r
+    offset = length | 0\r
+    length = swap\r
+  }\r
+\r
+  var remaining = this.length - offset\r
+  if (length === undefined || length > remaining) length = remaining\r
+\r
+  if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\r
+    throw new RangeError('attempt to write outside buffer bounds')\r
+  }\r
+\r
+  if (!encoding) encoding = 'utf8'\r
+\r
+  var loweredCase = false\r
+  for (;;) {\r
+    switch (encoding) {\r
+      case 'hex':\r
+        return hexWrite(this, string, offset, length)\r
+\r
+      case 'utf8':\r
+      case 'utf-8':\r
+        return utf8Write(this, string, offset, length)\r
+\r
+      case 'ascii':\r
+        return asciiWrite(this, string, offset, length)\r
+\r
+      case 'binary':\r
+        return binaryWrite(this, string, offset, length)\r
+\r
+      case 'base64':\r
+        // Warning: maxLength not taken into account in base64Write\r
+        return base64Write(this, string, offset, length)\r
+\r
+      case 'ucs2':\r
+      case 'ucs-2':\r
+      case 'utf16le':\r
+      case 'utf-16le':\r
+        return ucs2Write(this, string, offset, length)\r
+\r
+      default:\r
+        if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\r
+        encoding = ('' + encoding).toLowerCase()\r
+        loweredCase = true\r
+    }\r
+  }\r
+}\r
+\r
+Buffer.prototype.toJSON = function toJSON () {\r
+  return {\r
+    type: 'Buffer',\r
+    data: Array.prototype.slice.call(this._arr || this, 0)\r
+  }\r
+}\r
+\r
+function base64Slice (buf, start, end) {\r
+  if (start === 0 && end === buf.length) {\r
+    return base64.fromByteArray(buf)\r
+  } else {\r
+    return base64.fromByteArray(buf.slice(start, end))\r
+  }\r
+}\r
+\r
+function utf8Slice (buf, start, end) {\r
+  end = Math.min(buf.length, end)\r
+  var res = []\r
+\r
+  var i = start\r
+  while (i < end) {\r
+    var firstByte = buf[i]\r
+    var codePoint = null\r
+    var bytesPerSequence = (firstByte > 0xEF) ? 4\r
+      : (firstByte > 0xDF) ? 3\r
+      : (firstByte > 0xBF) ? 2\r
+      : 1\r
+\r
+    if (i + bytesPerSequence <= end) {\r
+      var secondByte, thirdByte, fourthByte, tempCodePoint\r
+\r
+      switch (bytesPerSequence) {\r
+        case 1:\r
+          if (firstByte < 0x80) {\r
+            codePoint = firstByte\r
+          }\r
+          break\r
+        case 2:\r
+          secondByte = buf[i + 1]\r
+          if ((secondByte & 0xC0) === 0x80) {\r
+            tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\r
+            if (tempCodePoint > 0x7F) {\r
+              codePoint = tempCodePoint\r
+            }\r
+          }\r
+          break\r
+        case 3:\r
+          secondByte = buf[i + 1]\r
+          thirdByte = buf[i + 2]\r
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\r
+            tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\r
+            if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\r
+              codePoint = tempCodePoint\r
+            }\r
+          }\r
+          break\r
+        case 4:\r
+          secondByte = buf[i + 1]\r
+          thirdByte = buf[i + 2]\r
+          fourthByte = buf[i + 3]\r
+          if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\r
+            tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\r
+            if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\r
+              codePoint = tempCodePoint\r
+            }\r
+          }\r
+      }\r
+    }\r
+\r
+    if (codePoint === null) {\r
+      // we did not generate a valid codePoint so insert a\r
+      // replacement char (U+FFFD) and advance only 1 byte\r
+      codePoint = 0xFFFD\r
+      bytesPerSequence = 1\r
+    } else if (codePoint > 0xFFFF) {\r
+      // encode to utf16 (surrogate pair dance)\r
+      codePoint -= 0x10000\r
+      res.push(codePoint >>> 10 & 0x3FF | 0xD800)\r
+      codePoint = 0xDC00 | codePoint & 0x3FF\r
+    }\r
+\r
+    res.push(codePoint)\r
+    i += bytesPerSequence\r
+  }\r
+\r
+  return decodeCodePointsArray(res)\r
+}\r
+\r
+// Based on http://stackoverflow.com/a/22747272/680742, the browser with\r
+// the lowest limit is Chrome, with 0x10000 args.\r
+// We go 1 magnitude less, for safety\r
+var MAX_ARGUMENTS_LENGTH = 0x1000\r
+\r
+function decodeCodePointsArray (codePoints) {\r
+  var len = codePoints.length\r
+  if (len <= MAX_ARGUMENTS_LENGTH) {\r
+    return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\r
+  }\r
+\r
+  // Decode in chunks to avoid "call stack size exceeded".\r
+  var res = ''\r
+  var i = 0\r
+  while (i < len) {\r
+    res += String.fromCharCode.apply(\r
+      String,\r
+      codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\r
+    )\r
+  }\r
+  return res\r
+}\r
+\r
+function asciiSlice (buf, start, end) {\r
+  var ret = ''\r
+  end = Math.min(buf.length, end)\r
+\r
+  for (var i = start; i < end; i++) {\r
+    ret += String.fromCharCode(buf[i] & 0x7F)\r
+  }\r
+  return ret\r
+}\r
+\r
+function binarySlice (buf, start, end) {\r
+  var ret = ''\r
+  end = Math.min(buf.length, end)\r
+\r
+  for (var i = start; i < end; i++) {\r
+    ret += String.fromCharCode(buf[i])\r
+  }\r
+  return ret\r
+}\r
+\r
+function hexSlice (buf, start, end) {\r
+  var len = buf.length\r
+\r
+  if (!start || start < 0) start = 0\r
+  if (!end || end < 0 || end > len) end = len\r
+\r
+  var out = ''\r
+  for (var i = start; i < end; i++) {\r
+    out += toHex(buf[i])\r
+  }\r
+  return out\r
+}\r
+\r
+function utf16leSlice (buf, start, end) {\r
+  var bytes = buf.slice(start, end)\r
+  var res = ''\r
+  for (var i = 0; i < bytes.length; i += 2) {\r
+    res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)\r
+  }\r
+  return res\r
+}\r
+\r
+Buffer.prototype.slice = function slice (start, end) {\r
+  var len = this.length\r
+  start = ~~start\r
+  end = end === undefined ? len : ~~end\r
+\r
+  if (start < 0) {\r
+    start += len\r
+    if (start < 0) start = 0\r
+  } else if (start > len) {\r
+    start = len\r
+  }\r
+\r
+  if (end < 0) {\r
+    end += len\r
+    if (end < 0) end = 0\r
+  } else if (end > len) {\r
+    end = len\r
+  }\r
+\r
+  if (end < start) end = start\r
+\r
+  var newBuf\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    newBuf = Buffer._augment(this.subarray(start, end))\r
+  } else {\r
+    var sliceLen = end - start\r
+    newBuf = new Buffer(sliceLen, undefined)\r
+    for (var i = 0; i < sliceLen; i++) {\r
+      newBuf[i] = this[i + start]\r
+    }\r
+  }\r
+\r
+  if (newBuf.length) newBuf.parent = this.parent || this\r
+\r
+  return newBuf\r
+}\r
+\r
+/*\r
+ * Need to make sure that buffer isn't trying to write out of bounds.\r
+ */\r
+function checkOffset (offset, ext, length) {\r
+  if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\r
+  if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\r
+}\r
+\r
+Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) checkOffset(offset, byteLength, this.length)\r
+\r
+  var val = this[offset]\r
+  var mul = 1\r
+  var i = 0\r
+  while (++i < byteLength && (mul *= 0x100)) {\r
+    val += this[offset + i] * mul\r
+  }\r
+\r
+  return val\r
+}\r
+\r
+Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) {\r
+    checkOffset(offset, byteLength, this.length)\r
+  }\r
+\r
+  var val = this[offset + --byteLength]\r
+  var mul = 1\r
+  while (byteLength > 0 && (mul *= 0x100)) {\r
+    val += this[offset + --byteLength] * mul\r
+  }\r
+\r
+  return val\r
+}\r
+\r
+Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 1, this.length)\r
+  return this[offset]\r
+}\r
+\r
+Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 2, this.length)\r
+  return this[offset] | (this[offset + 1] << 8)\r
+}\r
+\r
+Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 2, this.length)\r
+  return (this[offset] << 8) | this[offset + 1]\r
+}\r
+\r
+Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+\r
+  return ((this[offset]) |\r
+      (this[offset + 1] << 8) |\r
+      (this[offset + 2] << 16)) +\r
+      (this[offset + 3] * 0x1000000)\r
+}\r
+\r
+Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+\r
+  return (this[offset] * 0x1000000) +\r
+    ((this[offset + 1] << 16) |\r
+    (this[offset + 2] << 8) |\r
+    this[offset + 3])\r
+}\r
+\r
+Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) checkOffset(offset, byteLength, this.length)\r
+\r
+  var val = this[offset]\r
+  var mul = 1\r
+  var i = 0\r
+  while (++i < byteLength && (mul *= 0x100)) {\r
+    val += this[offset + i] * mul\r
+  }\r
+  mul *= 0x80\r
+\r
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\r
+\r
+  return val\r
+}\r
+\r
+Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) checkOffset(offset, byteLength, this.length)\r
+\r
+  var i = byteLength\r
+  var mul = 1\r
+  var val = this[offset + --i]\r
+  while (i > 0 && (mul *= 0x100)) {\r
+    val += this[offset + --i] * mul\r
+  }\r
+  mul *= 0x80\r
+\r
+  if (val >= mul) val -= Math.pow(2, 8 * byteLength)\r
+\r
+  return val\r
+}\r
+\r
+Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 1, this.length)\r
+  if (!(this[offset] & 0x80)) return (this[offset])\r
+  return ((0xff - this[offset] + 1) * -1)\r
+}\r
+\r
+Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 2, this.length)\r
+  var val = this[offset] | (this[offset + 1] << 8)\r
+  return (val & 0x8000) ? val | 0xFFFF0000 : val\r
+}\r
+\r
+Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 2, this.length)\r
+  var val = this[offset + 1] | (this[offset] << 8)\r
+  return (val & 0x8000) ? val | 0xFFFF0000 : val\r
+}\r
+\r
+Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+\r
+  return (this[offset]) |\r
+    (this[offset + 1] << 8) |\r
+    (this[offset + 2] << 16) |\r
+    (this[offset + 3] << 24)\r
+}\r
+\r
+Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+\r
+  return (this[offset] << 24) |\r
+    (this[offset + 1] << 16) |\r
+    (this[offset + 2] << 8) |\r
+    (this[offset + 3])\r
+}\r
+\r
+Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+  return ieee754.read(this, offset, true, 23, 4)\r
+}\r
+\r
+Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 4, this.length)\r
+  return ieee754.read(this, offset, false, 23, 4)\r
+}\r
+\r
+Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 8, this.length)\r
+  return ieee754.read(this, offset, true, 52, 8)\r
+}\r
+\r
+Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\r
+  if (!noAssert) checkOffset(offset, 8, this.length)\r
+  return ieee754.read(this, offset, false, 52, 8)\r
+}\r
+\r
+function checkInt (buf, value, offset, ext, max, min) {\r
+  if (!Buffer.isBuffer(buf)) throw new TypeError('buffer must be a Buffer instance')\r
+  if (value > max || value < min) throw new RangeError('value is out of bounds')\r
+  if (offset + ext > buf.length) throw new RangeError('index out of range')\r
+}\r
+\r
+Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)\r
+\r
+  var mul = 1\r
+  var i = 0\r
+  this[offset] = value & 0xFF\r
+  while (++i < byteLength && (mul *= 0x100)) {\r
+    this[offset + i] = (value / mul) & 0xFF\r
+  }\r
+\r
+  return offset + byteLength\r
+}\r
+\r
+Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  byteLength = byteLength | 0\r
+  if (!noAssert) checkInt(this, value, offset, byteLength, Math.pow(2, 8 * byteLength), 0)\r
+\r
+  var i = byteLength - 1\r
+  var mul = 1\r
+  this[offset + i] = value & 0xFF\r
+  while (--i >= 0 && (mul *= 0x100)) {\r
+    this[offset + i] = (value / mul) & 0xFF\r
+  }\r
+\r
+  return offset + byteLength\r
+}\r
+\r
+Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\r
+  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\r
+  this[offset] = value\r
+  return offset + 1\r
+}\r
+\r
+function objectWriteUInt16 (buf, value, offset, littleEndian) {\r
+  if (value < 0) value = 0xffff + value + 1\r
+  for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; i++) {\r
+    buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>\r
+      (littleEndian ? i : 1 - i) * 8\r
+  }\r
+}\r
+\r
+Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = value\r
+    this[offset + 1] = (value >>> 8)\r
+  } else {\r
+    objectWriteUInt16(this, value, offset, true)\r
+  }\r
+  return offset + 2\r
+}\r
+\r
+Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = (value >>> 8)\r
+    this[offset + 1] = value\r
+  } else {\r
+    objectWriteUInt16(this, value, offset, false)\r
+  }\r
+  return offset + 2\r
+}\r
+\r
+function objectWriteUInt32 (buf, value, offset, littleEndian) {\r
+  if (value < 0) value = 0xffffffff + value + 1\r
+  for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; i++) {\r
+    buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff\r
+  }\r
+}\r
+\r
+Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset + 3] = (value >>> 24)\r
+    this[offset + 2] = (value >>> 16)\r
+    this[offset + 1] = (value >>> 8)\r
+    this[offset] = value\r
+  } else {\r
+    objectWriteUInt32(this, value, offset, true)\r
+  }\r
+  return offset + 4\r
+}\r
+\r
+Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = (value >>> 24)\r
+    this[offset + 1] = (value >>> 16)\r
+    this[offset + 2] = (value >>> 8)\r
+    this[offset + 3] = value\r
+  } else {\r
+    objectWriteUInt32(this, value, offset, false)\r
+  }\r
+  return offset + 4\r
+}\r
+\r
+Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) {\r
+    var limit = Math.pow(2, 8 * byteLength - 1)\r
+\r
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)\r
+  }\r
+\r
+  var i = 0\r
+  var mul = 1\r
+  var sub = value < 0 ? 1 : 0\r
+  this[offset] = value & 0xFF\r
+  while (++i < byteLength && (mul *= 0x100)) {\r
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\r
+  }\r
+\r
+  return offset + byteLength\r
+}\r
+\r
+Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) {\r
+    var limit = Math.pow(2, 8 * byteLength - 1)\r
+\r
+    checkInt(this, value, offset, byteLength, limit - 1, -limit)\r
+  }\r
+\r
+  var i = byteLength - 1\r
+  var mul = 1\r
+  var sub = value < 0 ? 1 : 0\r
+  this[offset + i] = value & 0xFF\r
+  while (--i >= 0 && (mul *= 0x100)) {\r
+    this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\r
+  }\r
+\r
+  return offset + byteLength\r
+}\r
+\r
+Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\r
+  if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)\r
+  if (value < 0) value = 0xff + value + 1\r
+  this[offset] = value\r
+  return offset + 1\r
+}\r
+\r
+Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = value\r
+    this[offset + 1] = (value >>> 8)\r
+  } else {\r
+    objectWriteUInt16(this, value, offset, true)\r
+  }\r
+  return offset + 2\r
+}\r
+\r
+Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = (value >>> 8)\r
+    this[offset + 1] = value\r
+  } else {\r
+    objectWriteUInt16(this, value, offset, false)\r
+  }\r
+  return offset + 2\r
+}\r
+\r
+Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = value\r
+    this[offset + 1] = (value >>> 8)\r
+    this[offset + 2] = (value >>> 16)\r
+    this[offset + 3] = (value >>> 24)\r
+  } else {\r
+    objectWriteUInt32(this, value, offset, true)\r
+  }\r
+  return offset + 4\r
+}\r
+\r
+Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\r
+  value = +value\r
+  offset = offset | 0\r
+  if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\r
+  if (value < 0) value = 0xffffffff + value + 1\r
+  if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+    this[offset] = (value >>> 24)\r
+    this[offset + 1] = (value >>> 16)\r
+    this[offset + 2] = (value >>> 8)\r
+    this[offset + 3] = value\r
+  } else {\r
+    objectWriteUInt32(this, value, offset, false)\r
+  }\r
+  return offset + 4\r
+}\r
+\r
+function checkIEEE754 (buf, value, offset, ext, max, min) {\r
+  if (value > max || value < min) throw new RangeError('value is out of bounds')\r
+  if (offset + ext > buf.length) throw new RangeError('index out of range')\r
+  if (offset < 0) throw new RangeError('index out of range')\r
+}\r
+\r
+function writeFloat (buf, value, offset, littleEndian, noAssert) {\r
+  if (!noAssert) {\r
+    checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\r
+  }\r
+  ieee754.write(buf, value, offset, littleEndian, 23, 4)\r
+  return offset + 4\r
+}\r
+\r
+Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\r
+  return writeFloat(this, value, offset, true, noAssert)\r
+}\r
+\r
+Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\r
+  return writeFloat(this, value, offset, false, noAssert)\r
+}\r
+\r
+function writeDouble (buf, value, offset, littleEndian, noAssert) {\r
+  if (!noAssert) {\r
+    checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\r
+  }\r
+  ieee754.write(buf, value, offset, littleEndian, 52, 8)\r
+  return offset + 8\r
+}\r
+\r
+Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\r
+  return writeDouble(this, value, offset, true, noAssert)\r
+}\r
+\r
+Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\r
+  return writeDouble(this, value, offset, false, noAssert)\r
+}\r
+\r
+// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\r
+Buffer.prototype.copy = function copy (target, targetStart, start, end) {\r
+  if (!start) start = 0\r
+  if (!end && end !== 0) end = this.length\r
+  if (targetStart >= target.length) targetStart = target.length\r
+  if (!targetStart) targetStart = 0\r
+  if (end > 0 && end < start) end = start\r
+\r
+  // Copy 0 bytes; we're done\r
+  if (end === start) return 0\r
+  if (target.length === 0 || this.length === 0) return 0\r
+\r
+  // Fatal error conditions\r
+  if (targetStart < 0) {\r
+    throw new RangeError('targetStart out of bounds')\r
+  }\r
+  if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')\r
+  if (end < 0) throw new RangeError('sourceEnd out of bounds')\r
+\r
+  // Are we oob?\r
+  if (end > this.length) end = this.length\r
+  if (target.length - targetStart < end - start) {\r
+    end = target.length - targetStart + start\r
+  }\r
+\r
+  var len = end - start\r
+  var i\r
+\r
+  if (this === target && start < targetStart && targetStart < end) {\r
+    // descending copy from end\r
+    for (i = len - 1; i >= 0; i--) {\r
+      target[i + targetStart] = this[i + start]\r
+    }\r
+  } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {\r
+    // ascending copy from start\r
+    for (i = 0; i < len; i++) {\r
+      target[i + targetStart] = this[i + start]\r
+    }\r
+  } else {\r
+    target._set(this.subarray(start, start + len), targetStart)\r
+  }\r
+\r
+  return len\r
+}\r
+\r
+// fill(value, start=0, end=buffer.length)\r
+Buffer.prototype.fill = function fill (value, start, end) {\r
+  if (!value) value = 0\r
+  if (!start) start = 0\r
+  if (!end) end = this.length\r
+\r
+  if (end < start) throw new RangeError('end < start')\r
+\r
+  // Fill 0 bytes; we're done\r
+  if (end === start) return\r
+  if (this.length === 0) return\r
+\r
+  if (start < 0 || start >= this.length) throw new RangeError('start out of bounds')\r
+  if (end < 0 || end > this.length) throw new RangeError('end out of bounds')\r
+\r
+  var i\r
+  if (typeof value === 'number') {\r
+    for (i = start; i < end; i++) {\r
+      this[i] = value\r
+    }\r
+  } else {\r
+    var bytes = utf8ToBytes(value.toString())\r
+    var len = bytes.length\r
+    for (i = start; i < end; i++) {\r
+      this[i] = bytes[i % len]\r
+    }\r
+  }\r
+\r
+  return this\r
+}\r
+\r
+/**\r
+ * Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance.\r
+ * Added in Node 0.12. Only available in browsers that support ArrayBuffer.\r
+ */\r
+Buffer.prototype.toArrayBuffer = function toArrayBuffer () {\r
+  if (typeof Uint8Array !== 'undefined') {\r
+    if (Buffer.TYPED_ARRAY_SUPPORT) {\r
+      return (new Buffer(this)).buffer\r
+    } else {\r
+      var buf = new Uint8Array(this.length)\r
+      for (var i = 0, len = buf.length; i < len; i += 1) {\r
+        buf[i] = this[i]\r
+      }\r
+      return buf.buffer\r
+    }\r
+  } else {\r
+    throw new TypeError('Buffer.toArrayBuffer not supported in this browser')\r
+  }\r
+}\r
+\r
+// HELPER FUNCTIONS\r
+// ================\r
+\r
+var BP = Buffer.prototype\r
+\r
+/**\r
+ * Augment a Uint8Array *instance* (not the Uint8Array class!) with Buffer methods\r
+ */\r
+Buffer._augment = function _augment (arr) {\r
+  arr.constructor = Buffer\r
+  arr._isBuffer = true\r
+\r
+  // save reference to original Uint8Array set method before overwriting\r
+  arr._set = arr.set\r
+\r
+  // deprecated\r
+  arr.get = BP.get\r
+  arr.set = BP.set\r
+\r
+  arr.write = BP.write\r
+  arr.toString = BP.toString\r
+  arr.toLocaleString = BP.toString\r
+  arr.toJSON = BP.toJSON\r
+  arr.equals = BP.equals\r
+  arr.compare = BP.compare\r
+  arr.indexOf = BP.indexOf\r
+  arr.copy = BP.copy\r
+  arr.slice = BP.slice\r
+  arr.readUIntLE = BP.readUIntLE\r
+  arr.readUIntBE = BP.readUIntBE\r
+  arr.readUInt8 = BP.readUInt8\r
+  arr.readUInt16LE = BP.readUInt16LE\r
+  arr.readUInt16BE = BP.readUInt16BE\r
+  arr.readUInt32LE = BP.readUInt32LE\r
+  arr.readUInt32BE = BP.readUInt32BE\r
+  arr.readIntLE = BP.readIntLE\r
+  arr.readIntBE = BP.readIntBE\r
+  arr.readInt8 = BP.readInt8\r
+  arr.readInt16LE = BP.readInt16LE\r
+  arr.readInt16BE = BP.readInt16BE\r
+  arr.readInt32LE = BP.readInt32LE\r
+  arr.readInt32BE = BP.readInt32BE\r
+  arr.readFloatLE = BP.readFloatLE\r
+  arr.readFloatBE = BP.readFloatBE\r
+  arr.readDoubleLE = BP.readDoubleLE\r
+  arr.readDoubleBE = BP.readDoubleBE\r
+  arr.writeUInt8 = BP.writeUInt8\r
+  arr.writeUIntLE = BP.writeUIntLE\r
+  arr.writeUIntBE = BP.writeUIntBE\r
+  arr.writeUInt16LE = BP.writeUInt16LE\r
+  arr.writeUInt16BE = BP.writeUInt16BE\r
+  arr.writeUInt32LE = BP.writeUInt32LE\r
+  arr.writeUInt32BE = BP.writeUInt32BE\r
+  arr.writeIntLE = BP.writeIntLE\r
+  arr.writeIntBE = BP.writeIntBE\r
+  arr.writeInt8 = BP.writeInt8\r
+  arr.writeInt16LE = BP.writeInt16LE\r
+  arr.writeInt16BE = BP.writeInt16BE\r
+  arr.writeInt32LE = BP.writeInt32LE\r
+  arr.writeInt32BE = BP.writeInt32BE\r
+  arr.writeFloatLE = BP.writeFloatLE\r
+  arr.writeFloatBE = BP.writeFloatBE\r
+  arr.writeDoubleLE = BP.writeDoubleLE\r
+  arr.writeDoubleBE = BP.writeDoubleBE\r
+  arr.fill = BP.fill\r
+  arr.inspect = BP.inspect\r
+  arr.toArrayBuffer = BP.toArrayBuffer\r
+\r
+  return arr\r
+}\r
+\r
+var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g\r
+\r
+function base64clean (str) {\r
+  // Node strips out invalid characters like \n and \t from the string, base64-js does not\r
+  str = stringtrim(str).replace(INVALID_BASE64_RE, '')\r
+  // Node converts strings with length < 2 to ''\r
+  if (str.length < 2) return ''\r
+  // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\r
+  while (str.length % 4 !== 0) {\r
+    str = str + '='\r
+  }\r
+  return str\r
+}\r
+\r
+function stringtrim (str) {\r
+  if (str.trim) return str.trim()\r
+  return str.replace(/^\s+|\s+$/g, '')\r
+}\r
+\r
+function toHex (n) {\r
+  if (n < 16) return '0' + n.toString(16)\r
+  return n.toString(16)\r
+}\r
+\r
+function utf8ToBytes (string, units) {\r
+  units = units || Infinity\r
+  var codePoint\r
+  var length = string.length\r
+  var leadSurrogate = null\r
+  var bytes = []\r
+\r
+  for (var i = 0; i < length; i++) {\r
+    codePoint = string.charCodeAt(i)\r
+\r
+    // is surrogate component\r
+    if (codePoint > 0xD7FF && codePoint < 0xE000) {\r
+      // last char was a lead\r
+      if (!leadSurrogate) {\r
+        // no lead yet\r
+        if (codePoint > 0xDBFF) {\r
+          // unexpected trail\r
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\r
+          continue\r
+        } else if (i + 1 === length) {\r
+          // unpaired lead\r
+          if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\r
+          continue\r
+        }\r
+\r
+        // valid lead\r
+        leadSurrogate = codePoint\r
+\r
+        continue\r
+      }\r
+\r
+      // 2 leads in a row\r
+      if (codePoint < 0xDC00) {\r
+        if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\r
+        leadSurrogate = codePoint\r
+        continue\r
+      }\r
+\r
+      // valid surrogate pair\r
+      codePoint = leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 | 0x10000\r
+    } else if (leadSurrogate) {\r
+      // valid bmp char, but last char was a lead\r
+      if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\r
+    }\r
+\r
+    leadSurrogate = null\r
+\r
+    // encode utf8\r
+    if (codePoint < 0x80) {\r
+      if ((units -= 1) < 0) break\r
+      bytes.push(codePoint)\r
+    } else if (codePoint < 0x800) {\r
+      if ((units -= 2) < 0) break\r
+      bytes.push(\r
+        codePoint >> 0x6 | 0xC0,\r
+        codePoint & 0x3F | 0x80\r
+      )\r
+    } else if (codePoint < 0x10000) {\r
+      if ((units -= 3) < 0) break\r
+      bytes.push(\r
+        codePoint >> 0xC | 0xE0,\r
+        codePoint >> 0x6 & 0x3F | 0x80,\r
+        codePoint & 0x3F | 0x80\r
+      )\r
+    } else if (codePoint < 0x110000) {\r
+      if ((units -= 4) < 0) break\r
+      bytes.push(\r
+        codePoint >> 0x12 | 0xF0,\r
+        codePoint >> 0xC & 0x3F | 0x80,\r
+        codePoint >> 0x6 & 0x3F | 0x80,\r
+        codePoint & 0x3F | 0x80\r
+      )\r
+    } else {\r
+      throw new Error('Invalid code point')\r
+    }\r
+  }\r
+\r
+  return bytes\r
+}\r
+\r
+function asciiToBytes (str) {\r
+  var byteArray = []\r
+  for (var i = 0; i < str.length; i++) {\r
+    // Node's code seems to be doing this and not & 0x7F..\r
+    byteArray.push(str.charCodeAt(i) & 0xFF)\r
+  }\r
+  return byteArray\r
+}\r
+\r
+function utf16leToBytes (str, units) {\r
+  var c, hi, lo\r
+  var byteArray = []\r
+  for (var i = 0; i < str.length; i++) {\r
+    if ((units -= 2) < 0) break\r
+\r
+    c = str.charCodeAt(i)\r
+    hi = c >> 8\r
+    lo = c % 256\r
+    byteArray.push(lo)\r
+    byteArray.push(hi)\r
+  }\r
+\r
+  return byteArray\r
+}\r
+\r
+function base64ToBytes (str) {\r
+  return base64.toByteArray(base64clean(str))\r
+}\r
+\r
+function blitBuffer (src, dst, offset, length) {\r
+  for (var i = 0; i < length; i++) {\r
+    if ((i + offset >= dst.length) || (i >= src.length)) break\r
+    dst[i + offset] = src[i]\r
+  }\r
+  return i\r
+}\r
+\r
+},{"base64-js":16,"ieee754":17,"is-array":18}],16:[function(require,module,exports){\r
+var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r
+\r
+;(function (exports) {\r
+       'use strict';\r
+\r
+  var Arr = (typeof Uint8Array !== 'undefined')\r
+    ? Uint8Array\r
+    : Array\r
+\r
+       var PLUS   = '+'.charCodeAt(0)\r
+       var SLASH  = '/'.charCodeAt(0)\r
+       var NUMBER = '0'.charCodeAt(0)\r
+       var LOWER  = 'a'.charCodeAt(0)\r
+       var UPPER  = 'A'.charCodeAt(0)\r
+       var PLUS_URL_SAFE = '-'.charCodeAt(0)\r
+       var SLASH_URL_SAFE = '_'.charCodeAt(0)\r
+\r
+       function decode (elt) {\r
+               var code = elt.charCodeAt(0)\r
+               if (code === PLUS ||\r
+                   code === PLUS_URL_SAFE)\r
+                       return 62 // '+'\r
+               if (code === SLASH ||\r
+                   code === SLASH_URL_SAFE)\r
+                       return 63 // '/'\r
+               if (code < NUMBER)\r
+                       return -1 //no match\r
+               if (code < NUMBER + 10)\r
+                       return code - NUMBER + 26 + 26\r
+               if (code < UPPER + 26)\r
+                       return code - UPPER\r
+               if (code < LOWER + 26)\r
+                       return code - LOWER + 26\r
+       }\r
+\r
+       function b64ToByteArray (b64) {\r
+               var i, j, l, tmp, placeHolders, arr\r
+\r
+               if (b64.length % 4 > 0) {\r
+                       throw new Error('Invalid string. Length must be a multiple of 4')\r
+               }\r
+\r
+               // the number of equal signs (place holders)\r
+               // if there are two placeholders, than the two characters before it\r
+               // represent one byte\r
+               // if there is only one, then the three characters before it represent 2 bytes\r
+               // this is just a cheap hack to not do indexOf twice\r
+               var len = b64.length\r
+               placeHolders = '=' === b64.charAt(len - 2) ? 2 : '=' === b64.charAt(len - 1) ? 1 : 0\r
+\r
+               // base64 is 4/3 + up to two characters of the original data\r
+               arr = new Arr(b64.length * 3 / 4 - placeHolders)\r
+\r
+               // if there are placeholders, only get up to the last complete 4 chars\r
+               l = placeHolders > 0 ? b64.length - 4 : b64.length\r
+\r
+               var L = 0\r
+\r
+               function push (v) {\r
+                       arr[L++] = v\r
+               }\r
+\r
+               for (i = 0, j = 0; i < l; i += 4, j += 3) {\r
+                       tmp = (decode(b64.charAt(i)) << 18) | (decode(b64.charAt(i + 1)) << 12) | (decode(b64.charAt(i + 2)) << 6) | decode(b64.charAt(i + 3))\r
+                       push((tmp & 0xFF0000) >> 16)\r
+                       push((tmp & 0xFF00) >> 8)\r
+                       push(tmp & 0xFF)\r
+               }\r
+\r
+               if (placeHolders === 2) {\r
+                       tmp = (decode(b64.charAt(i)) << 2) | (decode(b64.charAt(i + 1)) >> 4)\r
+                       push(tmp & 0xFF)\r
+               } else if (placeHolders === 1) {\r
+                       tmp = (decode(b64.charAt(i)) << 10) | (decode(b64.charAt(i + 1)) << 4) | (decode(b64.charAt(i + 2)) >> 2)\r
+                       push((tmp >> 8) & 0xFF)\r
+                       push(tmp & 0xFF)\r
+               }\r
+\r
+               return arr\r
+       }\r
+\r
+       function uint8ToBase64 (uint8) {\r
+               var i,\r
+                       extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes\r
+                       output = "",\r
+                       temp, length\r
+\r
+               function encode (num) {\r
+                       return lookup.charAt(num)\r
+               }\r
+\r
+               function tripletToBase64 (num) {\r
+                       return encode(num >> 18 & 0x3F) + encode(num >> 12 & 0x3F) + encode(num >> 6 & 0x3F) + encode(num & 0x3F)\r
+               }\r
+\r
+               // go through the array every three bytes, we'll deal with trailing stuff later\r
+               for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) {\r
+                       temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2])\r
+                       output += tripletToBase64(temp)\r
+               }\r
+\r
+               // pad the end with zeros, but make sure to not forget the extra bytes\r
+               switch (extraBytes) {\r
+                       case 1:\r
+                               temp = uint8[uint8.length - 1]\r
+                               output += encode(temp >> 2)\r
+                               output += encode((temp << 4) & 0x3F)\r
+                               output += '=='\r
+                               break\r
+                       case 2:\r
+                               temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1])\r
+                               output += encode(temp >> 10)\r
+                               output += encode((temp >> 4) & 0x3F)\r
+                               output += encode((temp << 2) & 0x3F)\r
+                               output += '='\r
+                               break\r
+               }\r
+\r
+               return output\r
+       }\r
+\r
+       exports.toByteArray = b64ToByteArray\r
+       exports.fromByteArray = uint8ToBase64\r
+}(typeof exports === 'undefined' ? (this.base64js = {}) : exports))\r
+\r
+},{}],17:[function(require,module,exports){\r
+exports.read = function (buffer, offset, isLE, mLen, nBytes) {\r
+  var e, m\r
+  var eLen = nBytes * 8 - mLen - 1\r
+  var eMax = (1 << eLen) - 1\r
+  var eBias = eMax >> 1\r
+  var nBits = -7\r
+  var i = isLE ? (nBytes - 1) : 0\r
+  var d = isLE ? -1 : 1\r
+  var s = buffer[offset + i]\r
+\r
+  i += d\r
+\r
+  e = s & ((1 << (-nBits)) - 1)\r
+  s >>= (-nBits)\r
+  nBits += eLen\r
+  for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r
+\r
+  m = e & ((1 << (-nBits)) - 1)\r
+  e >>= (-nBits)\r
+  nBits += mLen\r
+  for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {}\r
+\r
+  if (e === 0) {\r
+    e = 1 - eBias\r
+  } else if (e === eMax) {\r
+    return m ? NaN : ((s ? -1 : 1) * Infinity)\r
+  } else {\r
+    m = m + Math.pow(2, mLen)\r
+    e = e - eBias\r
+  }\r
+  return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\r
+}\r
+\r
+exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\r
+  var e, m, c\r
+  var eLen = nBytes * 8 - mLen - 1\r
+  var eMax = (1 << eLen) - 1\r
+  var eBias = eMax >> 1\r
+  var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\r
+  var i = isLE ? 0 : (nBytes - 1)\r
+  var d = isLE ? 1 : -1\r
+  var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\r
+\r
+  value = Math.abs(value)\r
+\r
+  if (isNaN(value) || value === Infinity) {\r
+    m = isNaN(value) ? 1 : 0\r
+    e = eMax\r
+  } else {\r
+    e = Math.floor(Math.log(value) / Math.LN2)\r
+    if (value * (c = Math.pow(2, -e)) < 1) {\r
+      e--\r
+      c *= 2\r
+    }\r
+    if (e + eBias >= 1) {\r
+      value += rt / c\r
+    } else {\r
+      value += rt * Math.pow(2, 1 - eBias)\r
+    }\r
+    if (value * c >= 2) {\r
+      e++\r
+      c /= 2\r
+    }\r
+\r
+    if (e + eBias >= eMax) {\r
+      m = 0\r
+      e = eMax\r
+    } else if (e + eBias >= 1) {\r
+      m = (value * c - 1) * Math.pow(2, mLen)\r
+      e = e + eBias\r
+    } else {\r
+      m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\r
+      e = 0\r
+    }\r
+  }\r
+\r
+  for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\r
+\r
+  e = (e << mLen) | m\r
+  eLen += mLen\r
+  for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\r
+\r
+  buffer[offset + i - d] |= s * 128\r
+}\r
+\r
+},{}],18:[function(require,module,exports){\r
+\r
+/**\r
+ * isArray\r
+ */\r
+\r
+var isArray = Array.isArray;\r
+\r
+/**\r
+ * toString\r
+ */\r
+\r
+var str = Object.prototype.toString;\r
+\r
+/**\r
+ * Whether or not the given `val`\r
+ * is an array.\r
+ *\r
+ * example:\r
+ *\r
+ *        isArray([]);\r
+ *        // > true\r
+ *        isArray(arguments);\r
+ *        // > false\r
+ *        isArray('');\r
+ *        // > false\r
+ *\r
+ * @param {mixed} val\r
+ * @return {bool}\r
+ */\r
+\r
+module.exports = isArray || function (val) {\r
+  return !! val && '[object Array]' == str.call(val);\r
+};\r
+\r
+},{}],19:[function(require,module,exports){\r
+\r
+/**\r
+ * Expose `Emitter`.\r
+ */\r
+\r
+module.exports = Emitter;\r
+\r
+/**\r
+ * Initialize a new `Emitter`.\r
+ *\r
+ * @api public\r
+ */\r
+\r
+function Emitter(obj) {\r
+  if (obj) return mixin(obj);\r
+};\r
+\r
+/**\r
+ * Mixin the emitter properties.\r
+ *\r
+ * @param {Object} obj\r
+ * @return {Object}\r
+ * @api private\r
+ */\r
+\r
+function mixin(obj) {\r
+  for (var key in Emitter.prototype) {\r
+    obj[key] = Emitter.prototype[key];\r
+  }\r
+  return obj;\r
+}\r
+\r
+/**\r
+ * Listen on the given `event` with `fn`.\r
+ *\r
+ * @param {String} event\r
+ * @param {Function} fn\r
+ * @return {Emitter}\r
+ * @api public\r
+ */\r
+\r
+Emitter.prototype.on =\r
+Emitter.prototype.addEventListener = function(event, fn){\r
+  this._callbacks = this._callbacks || {};\r
+  (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\r
+    .push(fn);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Adds an `event` listener that will be invoked a single\r
+ * time then automatically removed.\r
+ *\r
+ * @param {String} event\r
+ * @param {Function} fn\r
+ * @return {Emitter}\r
+ * @api public\r
+ */\r
+\r
+Emitter.prototype.once = function(event, fn){\r
+  function on() {\r
+    this.off(event, on);\r
+    fn.apply(this, arguments);\r
+  }\r
+\r
+  on.fn = fn;\r
+  this.on(event, on);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Remove the given callback for `event` or all\r
+ * registered callbacks.\r
+ *\r
+ * @param {String} event\r
+ * @param {Function} fn\r
+ * @return {Emitter}\r
+ * @api public\r
+ */\r
+\r
+Emitter.prototype.off =\r
+Emitter.prototype.removeListener =\r
+Emitter.prototype.removeAllListeners =\r
+Emitter.prototype.removeEventListener = function(event, fn){\r
+  this._callbacks = this._callbacks || {};\r
+\r
+  // all\r
+  if (0 == arguments.length) {\r
+    this._callbacks = {};\r
+    return this;\r
+  }\r
+\r
+  // specific event\r
+  var callbacks = this._callbacks['$' + event];\r
+  if (!callbacks) return this;\r
+\r
+  // remove all handlers\r
+  if (1 == arguments.length) {\r
+    delete this._callbacks['$' + event];\r
+    return this;\r
+  }\r
+\r
+  // remove specific handler\r
+  var cb;\r
+  for (var i = 0; i < callbacks.length; i++) {\r
+    cb = callbacks[i];\r
+    if (cb === fn || cb.fn === fn) {\r
+      callbacks.splice(i, 1);\r
+      break;\r
+    }\r
+  }\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Emit `event` with the given args.\r
+ *\r
+ * @param {String} event\r
+ * @param {Mixed} ...\r
+ * @return {Emitter}\r
+ */\r
+\r
+Emitter.prototype.emit = function(event){\r
+  this._callbacks = this._callbacks || {};\r
+  var args = [].slice.call(arguments, 1)\r
+    , callbacks = this._callbacks['$' + event];\r
+\r
+  if (callbacks) {\r
+    callbacks = callbacks.slice(0);\r
+    for (var i = 0, len = callbacks.length; i < len; ++i) {\r
+      callbacks[i].apply(this, args);\r
+    }\r
+  }\r
+\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Return array of callbacks for `event`.\r
+ *\r
+ * @param {String} event\r
+ * @return {Array}\r
+ * @api public\r
+ */\r
+\r
+Emitter.prototype.listeners = function(event){\r
+  this._callbacks = this._callbacks || {};\r
+  return this._callbacks['$' + event] || [];\r
+};\r
+\r
+/**\r
+ * Check if this emitter has `event` handlers.\r
+ *\r
+ * @param {String} event\r
+ * @return {Boolean}\r
+ * @api public\r
+ */\r
+\r
+Emitter.prototype.hasListeners = function(event){\r
+  return !! this.listeners(event).length;\r
+};\r
+\r
+},{}],20:[function(require,module,exports){\r
+/* jshint node: true */\r
+(function () {\r
+    "use strict";\r
+\r
+    function CookieAccessInfo(domain, path, secure, script) {\r
+        if (this instanceof CookieAccessInfo) {\r
+            this.domain = domain || undefined;\r
+            this.path = path || "/";\r
+            this.secure = !!secure;\r
+            this.script = !!script;\r
+            return this;\r
+        }\r
+        return new CookieAccessInfo(domain, path, secure, script);\r
+    }\r
+    exports.CookieAccessInfo = CookieAccessInfo;\r
+\r
+    function Cookie(cookiestr, request_domain, request_path) {\r
+        if (cookiestr instanceof Cookie) {\r
+            return cookiestr;\r
+        }\r
+        if (this instanceof Cookie) {\r
+            this.name = null;\r
+            this.value = null;\r
+            this.expiration_date = Infinity;\r
+            this.path = String(request_path || "/");\r
+            this.explicit_path = false;\r
+            this.domain = request_domain || null;\r
+            this.explicit_domain = false;\r
+            this.secure = false; //how to define default?\r
+            this.noscript = false; //httponly\r
+            if (cookiestr) {\r
+                this.parse(cookiestr, request_domain, request_path);\r
+            }\r
+            return this;\r
+        }\r
+        return new Cookie(cookiestr, request_domain, request_path);\r
+    }\r
+    exports.Cookie = Cookie;\r
+\r
+    Cookie.prototype.toString = function toString() {\r
+        var str = [this.name + "=" + this.value];\r
+        if (this.expiration_date !== Infinity) {\r
+            str.push("expires=" + (new Date(this.expiration_date)).toGMTString());\r
+        }\r
+        if (this.domain) {\r
+            str.push("domain=" + this.domain);\r
+        }\r
+        if (this.path) {\r
+            str.push("path=" + this.path);\r
+        }\r
+        if (this.secure) {\r
+            str.push("secure");\r
+        }\r
+        if (this.noscript) {\r
+            str.push("httponly");\r
+        }\r
+        return str.join("; ");\r
+    };\r
+\r
+    Cookie.prototype.toValueString = function toValueString() {\r
+        return this.name + "=" + this.value;\r
+    };\r
+\r
+    var cookie_str_splitter = /[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;\r
+    Cookie.prototype.parse = function parse(str, request_domain, request_path) {\r
+        if (this instanceof Cookie) {\r
+            var parts = str.split(";").filter(function (value) {\r
+                    return !!value;\r
+                }),\r
+                pair = parts[0].match(/([^=]+)=([\s\S]*)/),\r
+                key = pair[1],\r
+                value = pair[2],\r
+                i;\r
+            this.name = key;\r
+            this.value = value;\r
+\r
+            for (i = 1; i < parts.length; i += 1) {\r
+                pair = parts[i].match(/([^=]+)(?:=([\s\S]*))?/);\r
+                key = pair[1].trim().toLowerCase();\r
+                value = pair[2];\r
+                switch (key) {\r
+                case "httponly":\r
+                    this.noscript = true;\r
+                    break;\r
+                case "expires":\r
+                    this.expiration_date = value ?\r
+                            Number(Date.parse(value)) :\r
+                            Infinity;\r
+                    break;\r
+                case "path":\r
+                    this.path = value ?\r
+                            value.trim() :\r
+                            "";\r
+                    this.explicit_path = true;\r
+                    break;\r
+                case "domain":\r
+                    this.domain = value ?\r
+                            value.trim() :\r
+                            "";\r
+                    this.explicit_domain = !!this.domain;\r
+                    break;\r
+                case "secure":\r
+                    this.secure = true;\r
+                    break;\r
+                }\r
+            }\r
+\r
+            if (!this.explicit_path) {\r
+               this.path = request_path || "/";\r
+            }\r
+            if (!this.explicit_domain) {\r
+               this.domain = request_domain;\r
+            }\r
+\r
+            return this;\r
+        }\r
+        return new Cookie().parse(str, request_domain, request_path);\r
+    };\r
+\r
+    Cookie.prototype.matches = function matches(access_info) {\r
+        if (this.noscript && access_info.script ||\r
+                this.secure && !access_info.secure ||\r
+                !this.collidesWith(access_info)) {\r
+            return false;\r
+        }\r
+        return true;\r
+    };\r
+\r
+    Cookie.prototype.collidesWith = function collidesWith(access_info) {\r
+        if ((this.path && !access_info.path) || (this.domain && !access_info.domain)) {\r
+            return false;\r
+        }\r
+        if (this.path && access_info.path.indexOf(this.path) !== 0) {\r
+            return false;\r
+        }\r
+        if (this.explicit_path && access_info.path.indexOf( this.path ) !== 0) {\r
+           return false;\r
+        }\r
+        var access_domain = access_info.domain && access_info.domain.replace(/^[\.]/,'');\r
+        var cookie_domain = this.domain && this.domain.replace(/^[\.]/,'');\r
+        if (cookie_domain === access_domain) {\r
+            return true;\r
+        }\r
+        if (cookie_domain) {\r
+            if (!this.explicit_domain) {\r
+                return false; // we already checked if the domains were exactly the same\r
+            }\r
+            var wildcard = access_domain.indexOf(cookie_domain);\r
+            if (wildcard === -1 || wildcard !== access_domain.length - cookie_domain.length) {\r
+                return false;\r
+            }\r
+            return true;\r
+        }\r
+        return true;\r
+    };\r
+\r
+    function CookieJar() {\r
+        var cookies, cookies_list, collidable_cookie;\r
+        if (this instanceof CookieJar) {\r
+            cookies = Object.create(null); //name: [Cookie]\r
+\r
+            this.setCookie = function setCookie(cookie, request_domain, request_path) {\r
+                var remove, i;\r
+                cookie = new Cookie(cookie, request_domain, request_path);\r
+                //Delete the cookie if the set is past the current time\r
+                remove = cookie.expiration_date <= Date.now();\r
+                if (cookies[cookie.name] !== undefined) {\r
+                    cookies_list = cookies[cookie.name];\r
+                    for (i = 0; i < cookies_list.length; i += 1) {\r
+                        collidable_cookie = cookies_list[i];\r
+                        if (collidable_cookie.collidesWith(cookie)) {\r
+                            if (remove) {\r
+                                cookies_list.splice(i, 1);\r
+                                if (cookies_list.length === 0) {\r
+                                    delete cookies[cookie.name];\r
+                                }\r
+                                return false;\r
+                            }\r
+                            cookies_list[i] = cookie;\r
+                            return cookie;\r
+                        }\r
+                    }\r
+                    if (remove) {\r
+                        return false;\r
+                    }\r
+                    cookies_list.push(cookie);\r
+                    return cookie;\r
+                }\r
+                if (remove) {\r
+                    return false;\r
+                }\r
+                cookies[cookie.name] = [cookie];\r
+                return cookies[cookie.name];\r
+            };\r
+            //returns a cookie\r
+            this.getCookie = function getCookie(cookie_name, access_info) {\r
+                var cookie, i;\r
+                cookies_list = cookies[cookie_name];\r
+                if (!cookies_list) {\r
+                    return;\r
+                }\r
+                for (i = 0; i < cookies_list.length; i += 1) {\r
+                    cookie = cookies_list[i];\r
+                    if (cookie.expiration_date <= Date.now()) {\r
+                        if (cookies_list.length === 0) {\r
+                            delete cookies[cookie.name];\r
+                        }\r
+                        continue;\r
+                    }\r
+\r
+                    if (cookie.matches(access_info)) {\r
+                        return cookie;\r
+                    }\r
+                }\r
+            };\r
+            //returns a list of cookies\r
+            this.getCookies = function getCookies(access_info) {\r
+                var matches = [], cookie_name, cookie;\r
+                for (cookie_name in cookies) {\r
+                    cookie = this.getCookie(cookie_name, access_info);\r
+                    if (cookie) {\r
+                        matches.push(cookie);\r
+                    }\r
+                }\r
+                matches.toString = function toString() {\r
+                    return matches.join(":");\r
+                };\r
+                matches.toValueString = function toValueString() {\r
+                    return matches.map(function (c) {\r
+                        return c.toValueString();\r
+                    }).join(';');\r
+                };\r
+                return matches;\r
+            };\r
+\r
+            return this;\r
+        }\r
+        return new CookieJar();\r
+    }\r
+    exports.CookieJar = CookieJar;\r
+\r
+    //returns list of cookies that were set correctly. Cookies that are expired and removed are not returned.\r
+    CookieJar.prototype.setCookies = function setCookies(cookies, request_domain, request_path) {\r
+        cookies = Array.isArray(cookies) ?\r
+                cookies :\r
+                cookies.split(cookie_str_splitter);\r
+        var successful = [],\r
+            i,\r
+            cookie;\r
+        cookies = cookies.map(function(item){\r
+            return new Cookie(item, request_domain, request_path);\r
+        });\r
+        for (i = 0; i < cookies.length; i += 1) {\r
+            cookie = cookies[i];\r
+            if (this.setCookie(cookie, request_domain, request_path)) {\r
+                successful.push(cookie);\r
+            }\r
+        }\r
+        return successful;\r
+    };\r
+}());\r
+\r
+},{}],21:[function(require,module,exports){\r
+'use strict';\r
+\r
+\r
+var yaml = require('./lib/js-yaml.js');\r
+\r
+\r
+module.exports = yaml;\r
+\r
+},{"./lib/js-yaml.js":22}],22:[function(require,module,exports){\r
+'use strict';\r
+\r
+\r
+var loader = require('./js-yaml/loader');\r
+var dumper = require('./js-yaml/dumper');\r
+\r
+\r
+function deprecated(name) {\r
+  return function () {\r
+    throw new Error('Function ' + name + ' is deprecated and cannot be used.');\r
+  };\r
+}\r
+\r
+\r
+module.exports.Type                = require('./js-yaml/type');\r
+module.exports.Schema              = require('./js-yaml/schema');\r
+module.exports.FAILSAFE_SCHEMA     = require('./js-yaml/schema/failsafe');\r
+module.exports.JSON_SCHEMA         = require('./js-yaml/schema/json');\r
+module.exports.CORE_SCHEMA         = require('./js-yaml/schema/core');\r
+module.exports.DEFAULT_SAFE_SCHEMA = require('./js-yaml/schema/default_safe');\r
+module.exports.DEFAULT_FULL_SCHEMA = require('./js-yaml/schema/default_full');\r
+module.exports.load                = loader.load;\r
+module.exports.loadAll             = loader.loadAll;\r
+module.exports.safeLoad            = loader.safeLoad;\r
+module.exports.safeLoadAll         = loader.safeLoadAll;\r
+module.exports.dump                = dumper.dump;\r
+module.exports.safeDump            = dumper.safeDump;\r
+module.exports.YAMLException       = require('./js-yaml/exception');\r
+\r
+// Deprecated schema names from JS-YAML 2.0.x\r
+module.exports.MINIMAL_SCHEMA = require('./js-yaml/schema/failsafe');\r
+module.exports.SAFE_SCHEMA    = require('./js-yaml/schema/default_safe');\r
+module.exports.DEFAULT_SCHEMA = require('./js-yaml/schema/default_full');\r
+\r
+// Deprecated functions from JS-YAML 1.x.x\r
+module.exports.scan           = deprecated('scan');\r
+module.exports.parse          = deprecated('parse');\r
+module.exports.compose        = deprecated('compose');\r
+module.exports.addConstructor = deprecated('addConstructor');\r
+\r
+},{"./js-yaml/dumper":24,"./js-yaml/exception":25,"./js-yaml/loader":26,"./js-yaml/schema":28,"./js-yaml/schema/core":29,"./js-yaml/schema/default_full":30,"./js-yaml/schema/default_safe":31,"./js-yaml/schema/failsafe":32,"./js-yaml/schema/json":33,"./js-yaml/type":34}],23:[function(require,module,exports){\r
+'use strict';\r
+\r
+\r
+function isNothing(subject) {\r
+  return (typeof subject === 'undefined') || (subject === null);\r
+}\r
+\r
+\r
+function isObject(subject) {\r
+  return (typeof subject === 'object') && (subject !== null);\r
+}\r
+\r
+\r
+function toArray(sequence) {\r
+  if (Array.isArray(sequence)) return sequence;\r
+  else if (isNothing(sequence)) return [];\r
+\r
+  return [ sequence ];\r
+}\r
+\r
+\r
+function extend(target, source) {\r
+  var index, length, key, sourceKeys;\r
+\r
+  if (source) {\r
+    sourceKeys = Object.keys(source);\r
+\r
+    for (index = 0, length = sourceKeys.length; index < length; index += 1) {\r
+      key = sourceKeys[index];\r
+      target[key] = source[key];\r
+    }\r
+  }\r
+\r
+  return target;\r
+}\r
+\r
+\r
+function repeat(string, count) {\r
+  var result = '', cycle;\r
+\r
+  for (cycle = 0; cycle < count; cycle += 1) {\r
+    result += string;\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+\r
+function isNegativeZero(number) {\r
+  return (number === 0) && (Number.NEGATIVE_INFINITY === 1 / number);\r
+}\r
+\r
+\r
+module.exports.isNothing      = isNothing;\r
+module.exports.isObject       = isObject;\r
+module.exports.toArray        = toArray;\r
+module.exports.repeat         = repeat;\r
+module.exports.isNegativeZero = isNegativeZero;\r
+module.exports.extend         = extend;\r
+\r
+},{}],24:[function(require,module,exports){\r
+'use strict';\r
+\r
+/*eslint-disable no-use-before-define*/\r
+\r
+var common              = require('./common');\r
+var YAMLException       = require('./exception');\r
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');\r
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\r
+\r
+var _toString       = Object.prototype.toString;\r
+var _hasOwnProperty = Object.prototype.hasOwnProperty;\r
+\r
+var CHAR_TAB                  = 0x09; /* Tab */\r
+var CHAR_LINE_FEED            = 0x0A; /* LF */\r
+var CHAR_CARRIAGE_RETURN      = 0x0D; /* CR */\r
+var CHAR_SPACE                = 0x20; /* Space */\r
+var CHAR_EXCLAMATION          = 0x21; /* ! */\r
+var CHAR_DOUBLE_QUOTE         = 0x22; /* " */\r
+var CHAR_SHARP                = 0x23; /* # */\r
+var CHAR_PERCENT              = 0x25; /* % */\r
+var CHAR_AMPERSAND            = 0x26; /* & */\r
+var CHAR_SINGLE_QUOTE         = 0x27; /* ' */\r
+var CHAR_ASTERISK             = 0x2A; /* * */\r
+var CHAR_COMMA                = 0x2C; /* , */\r
+var CHAR_MINUS                = 0x2D; /* - */\r
+var CHAR_COLON                = 0x3A; /* : */\r
+var CHAR_GREATER_THAN         = 0x3E; /* > */\r
+var CHAR_QUESTION             = 0x3F; /* ? */\r
+var CHAR_COMMERCIAL_AT        = 0x40; /* @ */\r
+var CHAR_LEFT_SQUARE_BRACKET  = 0x5B; /* [ */\r
+var CHAR_RIGHT_SQUARE_BRACKET = 0x5D; /* ] */\r
+var CHAR_GRAVE_ACCENT         = 0x60; /* ` */\r
+var CHAR_LEFT_CURLY_BRACKET   = 0x7B; /* { */\r
+var CHAR_VERTICAL_LINE        = 0x7C; /* | */\r
+var CHAR_RIGHT_CURLY_BRACKET  = 0x7D; /* } */\r
+\r
+var ESCAPE_SEQUENCES = {};\r
+\r
+ESCAPE_SEQUENCES[0x00]   = '\\0';\r
+ESCAPE_SEQUENCES[0x07]   = '\\a';\r
+ESCAPE_SEQUENCES[0x08]   = '\\b';\r
+ESCAPE_SEQUENCES[0x09]   = '\\t';\r
+ESCAPE_SEQUENCES[0x0A]   = '\\n';\r
+ESCAPE_SEQUENCES[0x0B]   = '\\v';\r
+ESCAPE_SEQUENCES[0x0C]   = '\\f';\r
+ESCAPE_SEQUENCES[0x0D]   = '\\r';\r
+ESCAPE_SEQUENCES[0x1B]   = '\\e';\r
+ESCAPE_SEQUENCES[0x22]   = '\\"';\r
+ESCAPE_SEQUENCES[0x5C]   = '\\\\';\r
+ESCAPE_SEQUENCES[0x85]   = '\\N';\r
+ESCAPE_SEQUENCES[0xA0]   = '\\_';\r
+ESCAPE_SEQUENCES[0x2028] = '\\L';\r
+ESCAPE_SEQUENCES[0x2029] = '\\P';\r
+\r
+var DEPRECATED_BOOLEANS_SYNTAX = [\r
+  'y', 'Y', 'yes', 'Yes', 'YES', 'on', 'On', 'ON',\r
+  'n', 'N', 'no', 'No', 'NO', 'off', 'Off', 'OFF'\r
+];\r
+\r
+function compileStyleMap(schema, map) {\r
+  var result, keys, index, length, tag, style, type;\r
+\r
+  if (map === null) return {};\r
+\r
+  result = {};\r
+  keys = Object.keys(map);\r
+\r
+  for (index = 0, length = keys.length; index < length; index += 1) {\r
+    tag = keys[index];\r
+    style = String(map[tag]);\r
+\r
+    if (tag.slice(0, 2) === '!!') {\r
+      tag = 'tag:yaml.org,2002:' + tag.slice(2);\r
+    }\r
+\r
+    type = schema.compiledTypeMap[tag];\r
+\r
+    if (type && _hasOwnProperty.call(type.styleAliases, style)) {\r
+      style = type.styleAliases[style];\r
+    }\r
+\r
+    result[tag] = style;\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+function encodeHex(character) {\r
+  var string, handle, length;\r
+\r
+  string = character.toString(16).toUpperCase();\r
+\r
+  if (character <= 0xFF) {\r
+    handle = 'x';\r
+    length = 2;\r
+  } else if (character <= 0xFFFF) {\r
+    handle = 'u';\r
+    length = 4;\r
+  } else if (character <= 0xFFFFFFFF) {\r
+    handle = 'U';\r
+    length = 8;\r
+  } else {\r
+    throw new YAMLException('code point within a string may not be greater than 0xFFFFFFFF');\r
+  }\r
+\r
+  return '\\' + handle + common.repeat('0', length - string.length) + string;\r
+}\r
+\r
+function State(options) {\r
+  this.schema      = options['schema'] || DEFAULT_FULL_SCHEMA;\r
+  this.indent      = Math.max(1, (options['indent'] || 2));\r
+  this.skipInvalid = options['skipInvalid'] || false;\r
+  this.flowLevel   = (common.isNothing(options['flowLevel']) ? -1 : options['flowLevel']);\r
+  this.styleMap    = compileStyleMap(this.schema, options['styles'] || null);\r
+  this.sortKeys    = options['sortKeys'] || false;\r
+  this.lineWidth   = options['lineWidth'] || 80;\r
+  this.noRefs      = options['noRefs'] || false;\r
+\r
+  this.implicitTypes = this.schema.compiledImplicit;\r
+  this.explicitTypes = this.schema.compiledExplicit;\r
+\r
+  this.tag = null;\r
+  this.result = '';\r
+\r
+  this.duplicates = [];\r
+  this.usedDuplicates = null;\r
+}\r
+\r
+function indentString(string, spaces) {\r
+  var ind = common.repeat(' ', spaces),\r
+      position = 0,\r
+      next = -1,\r
+      result = '',\r
+      line,\r
+      length = string.length;\r
+\r
+  while (position < length) {\r
+    next = string.indexOf('\n', position);\r
+    if (next === -1) {\r
+      line = string.slice(position);\r
+      position = length;\r
+    } else {\r
+      line = string.slice(position, next + 1);\r
+      position = next + 1;\r
+    }\r
+\r
+    if (line.length && line !== '\n') result += ind;\r
+\r
+    result += line;\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+function generateNextLine(state, level) {\r
+  return '\n' + common.repeat(' ', state.indent * level);\r
+}\r
+\r
+function testImplicitResolving(state, str) {\r
+  var index, length, type;\r
+\r
+  for (index = 0, length = state.implicitTypes.length; index < length; index += 1) {\r
+    type = state.implicitTypes[index];\r
+\r
+    if (type.resolve(str)) {\r
+      return true;\r
+    }\r
+  }\r
+\r
+  return false;\r
+}\r
+\r
+function StringBuilder(source) {\r
+  this.source = source;\r
+  this.result = '';\r
+  this.checkpoint = 0;\r
+}\r
+\r
+StringBuilder.prototype.takeUpTo = function (position) {\r
+  var er;\r
+\r
+  if (position < this.checkpoint) {\r
+    er = new Error('position should be > checkpoint');\r
+    er.position = position;\r
+    er.checkpoint = this.checkpoint;\r
+    throw er;\r
+  }\r
+\r
+  this.result += this.source.slice(this.checkpoint, position);\r
+  this.checkpoint = position;\r
+  return this;\r
+};\r
+\r
+StringBuilder.prototype.escapeChar = function () {\r
+  var character, esc;\r
+\r
+  character = this.source.charCodeAt(this.checkpoint);\r
+  esc = ESCAPE_SEQUENCES[character] || encodeHex(character);\r
+  this.result += esc;\r
+  this.checkpoint += 1;\r
+\r
+  return this;\r
+};\r
+\r
+StringBuilder.prototype.finish = function () {\r
+  if (this.source.length > this.checkpoint) {\r
+    this.takeUpTo(this.source.length);\r
+  }\r
+};\r
+\r
+function writeScalar(state, object, level, iskey) {\r
+  var simple, first, spaceWrap, folded, literal, single, double,\r
+      sawLineFeed, linePosition, longestLine, indent, max, character,\r
+      position, escapeSeq, hexEsc, previous, lineLength, modifier,\r
+      trailingLineBreaks, result;\r
+\r
+  if (object.length === 0) {\r
+    state.dump = "''";\r
+    return;\r
+  }\r
+\r
+  if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(object) !== -1) {\r
+    state.dump = "'" + object + "'";\r
+    return;\r
+  }\r
+\r
+  simple = true;\r
+  first = object.length ? object.charCodeAt(0) : 0;\r
+  spaceWrap = (CHAR_SPACE === first ||\r
+               CHAR_SPACE === object.charCodeAt(object.length - 1));\r
+\r
+  // Simplified check for restricted first characters\r
+  // http://www.yaml.org/spec/1.2/spec.html#ns-plain-first%28c%29\r
+  if (CHAR_MINUS         === first ||\r
+      CHAR_QUESTION      === first ||\r
+      CHAR_COMMERCIAL_AT === first ||\r
+      CHAR_GRAVE_ACCENT  === first) {\r
+    simple = false;\r
+  }\r
+\r
+  // Can only use > and | if not wrapped in spaces or is not a key.\r
+  // Also, don't use if in flow mode.\r
+  if (spaceWrap || (state.flowLevel > -1 && state.flowLevel <= level)) {\r
+    if (spaceWrap) simple = false;\r
+\r
+    folded = false;\r
+    literal = false;\r
+  } else {\r
+    folded = !iskey;\r
+    literal = !iskey;\r
+  }\r
+\r
+  single = true;\r
+  double = new StringBuilder(object);\r
+\r
+  sawLineFeed = false;\r
+  linePosition = 0;\r
+  longestLine = 0;\r
+\r
+  indent = state.indent * level;\r
+  max = state.lineWidth;\r
+\r
+  // Replace -1 with biggest ingeger number according to\r
+  // http://ecma262-5.com/ELS5_HTML.htm#Section_8.5\r
+  if (max === -1) max = 9007199254740991;\r
+\r
+  if (indent < 40) max -= indent;\r
+  else max = 40;\r
+\r
+  for (position = 0; position < object.length; position++) {\r
+    character = object.charCodeAt(position);\r
+    if (simple) {\r
+      // Characters that can never appear in the simple scalar\r
+      if (!simpleChar(character)) {\r
+        simple = false;\r
+      } else {\r
+        // Still simple.  If we make it all the way through like\r
+        // this, then we can just dump the string as-is.\r
+        continue;\r
+      }\r
+    }\r
+\r
+    if (single && character === CHAR_SINGLE_QUOTE) {\r
+      single = false;\r
+    }\r
+\r
+    escapeSeq = ESCAPE_SEQUENCES[character];\r
+    hexEsc = needsHexEscape(character);\r
+\r
+    if (!escapeSeq && !hexEsc) {\r
+      continue;\r
+    }\r
+\r
+    if (character !== CHAR_LINE_FEED &&\r
+        character !== CHAR_DOUBLE_QUOTE &&\r
+        character !== CHAR_SINGLE_QUOTE) {\r
+      folded = false;\r
+      literal = false;\r
+    } else if (character === CHAR_LINE_FEED) {\r
+      sawLineFeed = true;\r
+      single = false;\r
+      if (position > 0) {\r
+        previous = object.charCodeAt(position - 1);\r
+        if (previous === CHAR_SPACE) {\r
+          literal = false;\r
+          folded = false;\r
+        }\r
+      }\r
+      if (folded) {\r
+        lineLength = position - linePosition;\r
+        linePosition = position;\r
+        if (lineLength > longestLine) longestLine = lineLength;\r
+      }\r
+    }\r
+\r
+    if (character !== CHAR_DOUBLE_QUOTE) single = false;\r
+\r
+    double.takeUpTo(position);\r
+    double.escapeChar();\r
+  }\r
+\r
+  if (simple && testImplicitResolving(state, object)) simple = false;\r
+\r
+  modifier = '';\r
+  if (folded || literal) {\r
+    trailingLineBreaks = 0;\r
+    if (object.charCodeAt(object.length - 1) === CHAR_LINE_FEED) {\r
+      trailingLineBreaks += 1;\r
+      if (object.charCodeAt(object.length - 2) === CHAR_LINE_FEED) {\r
+        trailingLineBreaks += 1;\r
+      }\r
+    }\r
+\r
+    if (trailingLineBreaks === 0) modifier = '-';\r
+    else if (trailingLineBreaks === 2) modifier = '+';\r
+  }\r
+\r
+  if (literal && longestLine < max || state.tag !== null) {\r
+    folded = false;\r
+  }\r
+\r
+  // If it's literally one line, then don't bother with the literal.\r
+  // We may still want to do a fold, though, if it's a super long line.\r
+  if (!sawLineFeed) literal = false;\r
+\r
+  if (simple) {\r
+    state.dump = object;\r
+  } else if (single) {\r
+    state.dump = '\'' + object + '\'';\r
+  } else if (folded) {\r
+    result = fold(object, max);\r
+    state.dump = '>' + modifier + '\n' + indentString(result, indent);\r
+  } else if (literal) {\r
+    if (!modifier) object = object.replace(/\n$/, '');\r
+    state.dump = '|' + modifier + '\n' + indentString(object, indent);\r
+  } else if (double) {\r
+    double.finish();\r
+    state.dump = '"' + double.result + '"';\r
+  } else {\r
+    throw new Error('Failed to dump scalar value');\r
+  }\r
+\r
+  return;\r
+}\r
+\r
+// The `trailing` var is a regexp match of any trailing `\n` characters.\r
+//\r
+// There are three cases we care about:\r
+//\r
+// 1. One trailing `\n` on the string.  Just use `|` or `>`.\r
+//    This is the assumed default. (trailing = null)\r
+// 2. No trailing `\n` on the string.  Use `|-` or `>-` to "chomp" the end.\r
+// 3. More than one trailing `\n` on the string.  Use `|+` or `>+`.\r
+//\r
+// In the case of `>+`, these line breaks are *not* doubled (like the line\r
+// breaks within the string), so it's important to only end with the exact\r
+// same number as we started.\r
+function fold(object, max) {\r
+  var result = '',\r
+      position = 0,\r
+      length = object.length,\r
+      trailing = /\n+$/.exec(object),\r
+      newLine;\r
+\r
+  if (trailing) {\r
+    length = trailing.index + 1;\r
+  }\r
+\r
+  while (position < length) {\r
+    newLine = object.indexOf('\n', position);\r
+    if (newLine > length || newLine === -1) {\r
+      if (result) result += '\n\n';\r
+      result += foldLine(object.slice(position, length), max);\r
+      position = length;\r
+\r
+    } else {\r
+      if (result) result += '\n\n';\r
+      result += foldLine(object.slice(position, newLine), max);\r
+      position = newLine + 1;\r
+    }\r
+  }\r
+\r
+  if (trailing && trailing[0] !== '\n') result += trailing[0];\r
+\r
+  return result;\r
+}\r
+\r
+function foldLine(line, max) {\r
+  if (line === '') return line;\r
+\r
+  var foldRe = /[^\s] [^\s]/g,\r
+      result = '',\r
+      prevMatch = 0,\r
+      foldStart = 0,\r
+      match = foldRe.exec(line),\r
+      index,\r
+      foldEnd,\r
+      folded;\r
+\r
+  while (match) {\r
+    index = match.index;\r
+\r
+    // when we cross the max len, if the previous match would've\r
+    // been ok, use that one, and carry on.  If there was no previous\r
+    // match on this fold section, then just have a long line.\r
+    if (index - foldStart > max) {\r
+      if (prevMatch !== foldStart) foldEnd = prevMatch;\r
+      else foldEnd = index;\r
+\r
+      if (result) result += '\n';\r
+      folded = line.slice(foldStart, foldEnd);\r
+      result += folded;\r
+      foldStart = foldEnd + 1;\r
+    }\r
+    prevMatch = index + 1;\r
+    match = foldRe.exec(line);\r
+  }\r
+\r
+  if (result) result += '\n';\r
+\r
+  // if we end up with one last word at the end, then the last bit might\r
+  // be slightly bigger than we wanted, because we exited out of the loop.\r
+  if (foldStart !== prevMatch && line.length - foldStart > max) {\r
+    result += line.slice(foldStart, prevMatch) + '\n' +\r
+              line.slice(prevMatch + 1);\r
+  } else {\r
+    result += line.slice(foldStart);\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+// Returns true if character can be found in a simple scalar\r
+function simpleChar(character) {\r
+  return CHAR_TAB                  !== character &&\r
+         CHAR_LINE_FEED            !== character &&\r
+         CHAR_CARRIAGE_RETURN      !== character &&\r
+         CHAR_COMMA                !== character &&\r
+         CHAR_LEFT_SQUARE_BRACKET  !== character &&\r
+         CHAR_RIGHT_SQUARE_BRACKET !== character &&\r
+         CHAR_LEFT_CURLY_BRACKET   !== character &&\r
+         CHAR_RIGHT_CURLY_BRACKET  !== character &&\r
+         CHAR_SHARP                !== character &&\r
+         CHAR_AMPERSAND            !== character &&\r
+         CHAR_ASTERISK             !== character &&\r
+         CHAR_EXCLAMATION          !== character &&\r
+         CHAR_VERTICAL_LINE        !== character &&\r
+         CHAR_GREATER_THAN         !== character &&\r
+         CHAR_SINGLE_QUOTE         !== character &&\r
+         CHAR_DOUBLE_QUOTE         !== character &&\r
+         CHAR_PERCENT              !== character &&\r
+         CHAR_COLON                !== character &&\r
+         !ESCAPE_SEQUENCES[character]            &&\r
+         !needsHexEscape(character);\r
+}\r
+\r
+// Returns true if the character code needs to be escaped.\r
+function needsHexEscape(character) {\r
+  return !((0x00020 <= character && character <= 0x00007E) ||\r
+           (character === 0x00085)                         ||\r
+           (0x000A0 <= character && character <= 0x00D7FF) ||\r
+           (0x0E000 <= character && character <= 0x00FFFD) ||\r
+           (0x10000 <= character && character <= 0x10FFFF));\r
+}\r
+\r
+function writeFlowSequence(state, level, object) {\r
+  var _result = '',\r
+      _tag    = state.tag,\r
+      index,\r
+      length;\r
+\r
+  for (index = 0, length = object.length; index < length; index += 1) {\r
+    // Write only valid elements.\r
+    if (writeNode(state, level, object[index], false, false)) {\r
+      if (index !== 0) _result += ', ';\r
+      _result += state.dump;\r
+    }\r
+  }\r
+\r
+  state.tag = _tag;\r
+  state.dump = '[' + _result + ']';\r
+}\r
+\r
+function writeBlockSequence(state, level, object, compact) {\r
+  var _result = '',\r
+      _tag    = state.tag,\r
+      index,\r
+      length;\r
+\r
+  for (index = 0, length = object.length; index < length; index += 1) {\r
+    // Write only valid elements.\r
+    if (writeNode(state, level + 1, object[index], true, true)) {\r
+      if (!compact || index !== 0) {\r
+        _result += generateNextLine(state, level);\r
+      }\r
+      _result += '- ' + state.dump;\r
+    }\r
+  }\r
+\r
+  state.tag = _tag;\r
+  state.dump = _result || '[]'; // Empty sequence if no valid values.\r
+}\r
+\r
+function writeFlowMapping(state, level, object) {\r
+  var _result       = '',\r
+      _tag          = state.tag,\r
+      objectKeyList = Object.keys(object),\r
+      index,\r
+      length,\r
+      objectKey,\r
+      objectValue,\r
+      pairBuffer;\r
+\r
+  for (index = 0, length = objectKeyList.length; index < length; index += 1) {\r
+    pairBuffer = '';\r
+\r
+    if (index !== 0) pairBuffer += ', ';\r
+\r
+    objectKey = objectKeyList[index];\r
+    objectValue = object[objectKey];\r
+\r
+    if (!writeNode(state, level, objectKey, false, false)) {\r
+      continue; // Skip this pair because of invalid key;\r
+    }\r
+\r
+    if (state.dump.length > 1024) pairBuffer += '? ';\r
+\r
+    pairBuffer += state.dump + ': ';\r
+\r
+    if (!writeNode(state, level, objectValue, false, false)) {\r
+      continue; // Skip this pair because of invalid value.\r
+    }\r
+\r
+    pairBuffer += state.dump;\r
+\r
+    // Both key and value are valid.\r
+    _result += pairBuffer;\r
+  }\r
+\r
+  state.tag = _tag;\r
+  state.dump = '{' + _result + '}';\r
+}\r
+\r
+function writeBlockMapping(state, level, object, compact) {\r
+  var _result       = '',\r
+      _tag          = state.tag,\r
+      objectKeyList = Object.keys(object),\r
+      index,\r
+      length,\r
+      objectKey,\r
+      objectValue,\r
+      explicitPair,\r
+      pairBuffer;\r
+\r
+  // Allow sorting keys so that the output file is deterministic\r
+  if (state.sortKeys === true) {\r
+    // Default sorting\r
+    objectKeyList.sort();\r
+  } else if (typeof state.sortKeys === 'function') {\r
+    // Custom sort function\r
+    objectKeyList.sort(state.sortKeys);\r
+  } else if (state.sortKeys) {\r
+    // Something is wrong\r
+    throw new YAMLException('sortKeys must be a boolean or a function');\r
+  }\r
+\r
+  for (index = 0, length = objectKeyList.length; index < length; index += 1) {\r
+    pairBuffer = '';\r
+\r
+    if (!compact || index !== 0) {\r
+      pairBuffer += generateNextLine(state, level);\r
+    }\r
+\r
+    objectKey = objectKeyList[index];\r
+    objectValue = object[objectKey];\r
+\r
+    if (!writeNode(state, level + 1, objectKey, true, true, true)) {\r
+      continue; // Skip this pair because of invalid key.\r
+    }\r
+\r
+    explicitPair = (state.tag !== null && state.tag !== '?') ||\r
+                   (state.dump && state.dump.length > 1024);\r
+\r
+    if (explicitPair) {\r
+      if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\r
+        pairBuffer += '?';\r
+      } else {\r
+        pairBuffer += '? ';\r
+      }\r
+    }\r
+\r
+    pairBuffer += state.dump;\r
+\r
+    if (explicitPair) {\r
+      pairBuffer += generateNextLine(state, level);\r
+    }\r
+\r
+    if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {\r
+      continue; // Skip this pair because of invalid value.\r
+    }\r
+\r
+    if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {\r
+      pairBuffer += ':';\r
+    } else {\r
+      pairBuffer += ': ';\r
+    }\r
+\r
+    pairBuffer += state.dump;\r
+\r
+    // Both key and value are valid.\r
+    _result += pairBuffer;\r
+  }\r
+\r
+  state.tag = _tag;\r
+  state.dump = _result || '{}'; // Empty mapping if no valid pairs.\r
+}\r
+\r
+function detectType(state, object, explicit) {\r
+  var _result, typeList, index, length, type, style;\r
+\r
+  typeList = explicit ? state.explicitTypes : state.implicitTypes;\r
+\r
+  for (index = 0, length = typeList.length; index < length; index += 1) {\r
+    type = typeList[index];\r
+\r
+    if ((type.instanceOf  || type.predicate) &&\r
+        (!type.instanceOf || ((typeof object === 'object') && (object instanceof type.instanceOf))) &&\r
+        (!type.predicate  || type.predicate(object))) {\r
+\r
+      state.tag = explicit ? type.tag : '?';\r
+\r
+      if (type.represent) {\r
+        style = state.styleMap[type.tag] || type.defaultStyle;\r
+\r
+        if (_toString.call(type.represent) === '[object Function]') {\r
+          _result = type.represent(object, style);\r
+        } else if (_hasOwnProperty.call(type.represent, style)) {\r
+          _result = type.represent[style](object, style);\r
+        } else {\r
+          throw new YAMLException('!<' + type.tag + '> tag resolver accepts not "' + style + '" style');\r
+        }\r
+\r
+        state.dump = _result;\r
+      }\r
+\r
+      return true;\r
+    }\r
+  }\r
+\r
+  return false;\r
+}\r
+\r
+// Serializes `object` and writes it to global `result`.\r
+// Returns true on success, or false on invalid object.\r
+//\r
+function writeNode(state, level, object, block, compact, iskey) {\r
+  state.tag = null;\r
+  state.dump = object;\r
+\r
+  if (!detectType(state, object, false)) {\r
+    detectType(state, object, true);\r
+  }\r
+\r
+  var type = _toString.call(state.dump);\r
+\r
+  if (block) {\r
+    block = (state.flowLevel < 0 || state.flowLevel > level);\r
+  }\r
+\r
+  var objectOrArray = type === '[object Object]' || type === '[object Array]',\r
+      duplicateIndex,\r
+      duplicate;\r
+\r
+  if (objectOrArray) {\r
+    duplicateIndex = state.duplicates.indexOf(object);\r
+    duplicate = duplicateIndex !== -1;\r
+  }\r
+\r
+  if ((state.tag !== null && state.tag !== '?') || duplicate || (state.indent !== 2 && level > 0)) {\r
+    compact = false;\r
+  }\r
+\r
+  if (duplicate && state.usedDuplicates[duplicateIndex]) {\r
+    state.dump = '*ref_' + duplicateIndex;\r
+  } else {\r
+    if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {\r
+      state.usedDuplicates[duplicateIndex] = true;\r
+    }\r
+    if (type === '[object Object]') {\r
+      if (block && (Object.keys(state.dump).length !== 0)) {\r
+        writeBlockMapping(state, level, state.dump, compact);\r
+        if (duplicate) {\r
+          state.dump = '&ref_' + duplicateIndex + state.dump;\r
+        }\r
+      } else {\r
+        writeFlowMapping(state, level, state.dump);\r
+        if (duplicate) {\r
+          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\r
+        }\r
+      }\r
+    } else if (type === '[object Array]') {\r
+      if (block && (state.dump.length !== 0)) {\r
+        writeBlockSequence(state, level, state.dump, compact);\r
+        if (duplicate) {\r
+          state.dump = '&ref_' + duplicateIndex + state.dump;\r
+        }\r
+      } else {\r
+        writeFlowSequence(state, level, state.dump);\r
+        if (duplicate) {\r
+          state.dump = '&ref_' + duplicateIndex + ' ' + state.dump;\r
+        }\r
+      }\r
+    } else if (type === '[object String]') {\r
+      if (state.tag !== '?') {\r
+        writeScalar(state, state.dump, level, iskey);\r
+      }\r
+    } else {\r
+      if (state.skipInvalid) return false;\r
+      throw new YAMLException('unacceptable kind of an object to dump ' + type);\r
+    }\r
+\r
+    if (state.tag !== null && state.tag !== '?') {\r
+      state.dump = '!<' + state.tag + '> ' + state.dump;\r
+    }\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function getDuplicateReferences(object, state) {\r
+  var objects = [],\r
+      duplicatesIndexes = [],\r
+      index,\r
+      length;\r
+\r
+  inspectNode(object, objects, duplicatesIndexes);\r
+\r
+  for (index = 0, length = duplicatesIndexes.length; index < length; index += 1) {\r
+    state.duplicates.push(objects[duplicatesIndexes[index]]);\r
+  }\r
+  state.usedDuplicates = new Array(length);\r
+}\r
+\r
+function inspectNode(object, objects, duplicatesIndexes) {\r
+  var objectKeyList,\r
+      index,\r
+      length;\r
+\r
+  if (object !== null && typeof object === 'object') {\r
+    index = objects.indexOf(object);\r
+    if (index !== -1) {\r
+      if (duplicatesIndexes.indexOf(index) === -1) {\r
+        duplicatesIndexes.push(index);\r
+      }\r
+    } else {\r
+      objects.push(object);\r
+\r
+      if (Array.isArray(object)) {\r
+        for (index = 0, length = object.length; index < length; index += 1) {\r
+          inspectNode(object[index], objects, duplicatesIndexes);\r
+        }\r
+      } else {\r
+        objectKeyList = Object.keys(object);\r
+\r
+        for (index = 0, length = objectKeyList.length; index < length; index += 1) {\r
+          inspectNode(object[objectKeyList[index]], objects, duplicatesIndexes);\r
+        }\r
+      }\r
+    }\r
+  }\r
+}\r
+\r
+function dump(input, options) {\r
+  options = options || {};\r
+\r
+  var state = new State(options);\r
+\r
+  if (!state.noRefs) getDuplicateReferences(input, state);\r
+\r
+  if (writeNode(state, 0, input, true, true)) return state.dump + '\n';\r
+\r
+  return '';\r
+}\r
+\r
+function safeDump(input, options) {\r
+  return dump(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\r
+}\r
+\r
+module.exports.dump     = dump;\r
+module.exports.safeDump = safeDump;\r
+\r
+},{"./common":23,"./exception":25,"./schema/default_full":30,"./schema/default_safe":31}],25:[function(require,module,exports){\r
+// YAML error class. http://stackoverflow.com/questions/8458984\r
+//\r
+'use strict';\r
+\r
+function YAMLException(reason, mark) {\r
+  // Super constructor\r
+  Error.call(this);\r
+\r
+  // Include stack trace in error object\r
+  if (Error.captureStackTrace) {\r
+    // Chrome and NodeJS\r
+    Error.captureStackTrace(this, this.constructor);\r
+  } else {\r
+    // FF, IE 10+ and Safari 6+. Fallback for others\r
+    this.stack = (new Error()).stack || '';\r
+  }\r
+\r
+  this.name = 'YAMLException';\r
+  this.reason = reason;\r
+  this.mark = mark;\r
+  this.message = (this.reason || '(unknown reason)') + (this.mark ? ' ' + this.mark.toString() : '');\r
+}\r
+\r
+\r
+// Inherit from Error\r
+YAMLException.prototype = Object.create(Error.prototype);\r
+YAMLException.prototype.constructor = YAMLException;\r
+\r
+\r
+YAMLException.prototype.toString = function toString(compact) {\r
+  var result = this.name + ': ';\r
+\r
+  result += this.reason || '(unknown reason)';\r
+\r
+  if (!compact && this.mark) {\r
+    result += ' ' + this.mark.toString();\r
+  }\r
+\r
+  return result;\r
+};\r
+\r
+\r
+module.exports = YAMLException;\r
+\r
+},{}],26:[function(require,module,exports){\r
+'use strict';\r
+\r
+/*eslint-disable max-len,no-use-before-define*/\r
+\r
+var common              = require('./common');\r
+var YAMLException       = require('./exception');\r
+var Mark                = require('./mark');\r
+var DEFAULT_SAFE_SCHEMA = require('./schema/default_safe');\r
+var DEFAULT_FULL_SCHEMA = require('./schema/default_full');\r
+\r
+\r
+var _hasOwnProperty = Object.prototype.hasOwnProperty;\r
+\r
+\r
+var CONTEXT_FLOW_IN   = 1;\r
+var CONTEXT_FLOW_OUT  = 2;\r
+var CONTEXT_BLOCK_IN  = 3;\r
+var CONTEXT_BLOCK_OUT = 4;\r
+\r
+\r
+var CHOMPING_CLIP  = 1;\r
+var CHOMPING_STRIP = 2;\r
+var CHOMPING_KEEP  = 3;\r
+\r
+\r
+var PATTERN_NON_PRINTABLE         = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;\r
+var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;\r
+var PATTERN_FLOW_INDICATORS       = /[,\[\]\{\}]/;\r
+var PATTERN_TAG_HANDLE            = /^(?:!|!!|![a-z\-]+!)$/i;\r
+var PATTERN_TAG_URI               = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;\r
+\r
+\r
+function is_EOL(c) {\r
+  return (c === 0x0A/* LF */) || (c === 0x0D/* CR */);\r
+}\r
+\r
+function is_WHITE_SPACE(c) {\r
+  return (c === 0x09/* Tab */) || (c === 0x20/* Space */);\r
+}\r
+\r
+function is_WS_OR_EOL(c) {\r
+  return (c === 0x09/* Tab */) ||\r
+         (c === 0x20/* Space */) ||\r
+         (c === 0x0A/* LF */) ||\r
+         (c === 0x0D/* CR */);\r
+}\r
+\r
+function is_FLOW_INDICATOR(c) {\r
+  return c === 0x2C/* , */ ||\r
+         c === 0x5B/* [ */ ||\r
+         c === 0x5D/* ] */ ||\r
+         c === 0x7B/* { */ ||\r
+         c === 0x7D/* } */;\r
+}\r
+\r
+function fromHexCode(c) {\r
+  var lc;\r
+\r
+  if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\r
+    return c - 0x30;\r
+  }\r
+\r
+  /*eslint-disable no-bitwise*/\r
+  lc = c | 0x20;\r
+\r
+  if ((0x61/* a */ <= lc) && (lc <= 0x66/* f */)) {\r
+    return lc - 0x61 + 10;\r
+  }\r
+\r
+  return -1;\r
+}\r
+\r
+function escapedHexLen(c) {\r
+  if (c === 0x78/* x */) { return 2; }\r
+  if (c === 0x75/* u */) { return 4; }\r
+  if (c === 0x55/* U */) { return 8; }\r
+  return 0;\r
+}\r
+\r
+function fromDecimalCode(c) {\r
+  if ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) {\r
+    return c - 0x30;\r
+  }\r
+\r
+  return -1;\r
+}\r
+\r
+function simpleEscapeSequence(c) {\r
+  return (c === 0x30/* 0 */) ? '\x00' :\r
+        (c === 0x61/* a */) ? '\x07' :\r
+        (c === 0x62/* b */) ? '\x08' :\r
+        (c === 0x74/* t */) ? '\x09' :\r
+        (c === 0x09/* Tab */) ? '\x09' :\r
+        (c === 0x6E/* n */) ? '\x0A' :\r
+        (c === 0x76/* v */) ? '\x0B' :\r
+        (c === 0x66/* f */) ? '\x0C' :\r
+        (c === 0x72/* r */) ? '\x0D' :\r
+        (c === 0x65/* e */) ? '\x1B' :\r
+        (c === 0x20/* Space */) ? ' ' :\r
+        (c === 0x22/* " */) ? '\x22' :\r
+        (c === 0x2F/* / */) ? '/' :\r
+        (c === 0x5C/* \ */) ? '\x5C' :\r
+        (c === 0x4E/* N */) ? '\x85' :\r
+        (c === 0x5F/* _ */) ? '\xA0' :\r
+        (c === 0x4C/* L */) ? '\u2028' :\r
+        (c === 0x50/* P */) ? '\u2029' : '';\r
+}\r
+\r
+function charFromCodepoint(c) {\r
+  if (c <= 0xFFFF) {\r
+    return String.fromCharCode(c);\r
+  }\r
+  // Encode UTF-16 surrogate pair\r
+  // https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF\r
+  return String.fromCharCode(((c - 0x010000) >> 10) + 0xD800,\r
+                             ((c - 0x010000) & 0x03FF) + 0xDC00);\r
+}\r
+\r
+var simpleEscapeCheck = new Array(256); // integer, for fast access\r
+var simpleEscapeMap = new Array(256);\r
+for (var i = 0; i < 256; i++) {\r
+  simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;\r
+  simpleEscapeMap[i] = simpleEscapeSequence(i);\r
+}\r
+\r
+\r
+function State(input, options) {\r
+  this.input = input;\r
+\r
+  this.filename  = options['filename']  || null;\r
+  this.schema    = options['schema']    || DEFAULT_FULL_SCHEMA;\r
+  this.onWarning = options['onWarning'] || null;\r
+  this.legacy    = options['legacy']    || false;\r
+  this.json      = options['json']      || false;\r
+  this.listener  = options['listener']  || null;\r
+\r
+  this.implicitTypes = this.schema.compiledImplicit;\r
+  this.typeMap       = this.schema.compiledTypeMap;\r
+\r
+  this.length     = input.length;\r
+  this.position   = 0;\r
+  this.line       = 0;\r
+  this.lineStart  = 0;\r
+  this.lineIndent = 0;\r
+\r
+  this.documents = [];\r
+\r
+  /*\r
+  this.version;\r
+  this.checkLineBreaks;\r
+  this.tagMap;\r
+  this.anchorMap;\r
+  this.tag;\r
+  this.anchor;\r
+  this.kind;\r
+  this.result;*/\r
+\r
+}\r
+\r
+\r
+function generateError(state, message) {\r
+  return new YAMLException(\r
+    message,\r
+    new Mark(state.filename, state.input, state.position, state.line, (state.position - state.lineStart)));\r
+}\r
+\r
+function throwError(state, message) {\r
+  throw generateError(state, message);\r
+}\r
+\r
+function throwWarning(state, message) {\r
+  if (state.onWarning) {\r
+    state.onWarning.call(null, generateError(state, message));\r
+  }\r
+}\r
+\r
+\r
+var directiveHandlers = {\r
+\r
+  YAML: function handleYamlDirective(state, name, args) {\r
+\r
+    var match, major, minor;\r
+\r
+    if (state.version !== null) {\r
+      throwError(state, 'duplication of %YAML directive');\r
+    }\r
+\r
+    if (args.length !== 1) {\r
+      throwError(state, 'YAML directive accepts exactly one argument');\r
+    }\r
+\r
+    match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);\r
+\r
+    if (match === null) {\r
+      throwError(state, 'ill-formed argument of the YAML directive');\r
+    }\r
+\r
+    major = parseInt(match[1], 10);\r
+    minor = parseInt(match[2], 10);\r
+\r
+    if (major !== 1) {\r
+      throwError(state, 'unacceptable YAML version of the document');\r
+    }\r
+\r
+    state.version = args[0];\r
+    state.checkLineBreaks = (minor < 2);\r
+\r
+    if (minor !== 1 && minor !== 2) {\r
+      throwWarning(state, 'unsupported YAML version of the document');\r
+    }\r
+  },\r
+\r
+  TAG: function handleTagDirective(state, name, args) {\r
+\r
+    var handle, prefix;\r
+\r
+    if (args.length !== 2) {\r
+      throwError(state, 'TAG directive accepts exactly two arguments');\r
+    }\r
+\r
+    handle = args[0];\r
+    prefix = args[1];\r
+\r
+    if (!PATTERN_TAG_HANDLE.test(handle)) {\r
+      throwError(state, 'ill-formed tag handle (first argument) of the TAG directive');\r
+    }\r
+\r
+    if (_hasOwnProperty.call(state.tagMap, handle)) {\r
+      throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');\r
+    }\r
+\r
+    if (!PATTERN_TAG_URI.test(prefix)) {\r
+      throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive');\r
+    }\r
+\r
+    state.tagMap[handle] = prefix;\r
+  }\r
+};\r
+\r
+\r
+function captureSegment(state, start, end, checkJson) {\r
+  var _position, _length, _character, _result;\r
+\r
+  if (start < end) {\r
+    _result = state.input.slice(start, end);\r
+\r
+    if (checkJson) {\r
+      for (_position = 0, _length = _result.length;\r
+           _position < _length;\r
+           _position += 1) {\r
+        _character = _result.charCodeAt(_position);\r
+        if (!(_character === 0x09 ||\r
+              (0x20 <= _character && _character <= 0x10FFFF))) {\r
+          throwError(state, 'expected valid JSON character');\r
+        }\r
+      }\r
+    } else if (PATTERN_NON_PRINTABLE.test(_result)) {\r
+      throwError(state, 'the stream contains non-printable characters');\r
+    }\r
+\r
+    state.result += _result;\r
+  }\r
+}\r
+\r
+function mergeMappings(state, destination, source, overridableKeys) {\r
+  var sourceKeys, key, index, quantity;\r
+\r
+  if (!common.isObject(source)) {\r
+    throwError(state, 'cannot merge mappings; the provided source object is unacceptable');\r
+  }\r
+\r
+  sourceKeys = Object.keys(source);\r
+\r
+  for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {\r
+    key = sourceKeys[index];\r
+\r
+    if (!_hasOwnProperty.call(destination, key)) {\r
+      destination[key] = source[key];\r
+      overridableKeys[key] = true;\r
+    }\r
+  }\r
+}\r
+\r
+function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode) {\r
+  var index, quantity;\r
+\r
+  keyNode = String(keyNode);\r
+\r
+  if (_result === null) {\r
+    _result = {};\r
+  }\r
+\r
+  if (keyTag === 'tag:yaml.org,2002:merge') {\r
+    if (Array.isArray(valueNode)) {\r
+      for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {\r
+        mergeMappings(state, _result, valueNode[index], overridableKeys);\r
+      }\r
+    } else {\r
+      mergeMappings(state, _result, valueNode, overridableKeys);\r
+    }\r
+  } else {\r
+    if (!state.json &&\r
+        !_hasOwnProperty.call(overridableKeys, keyNode) &&\r
+        _hasOwnProperty.call(_result, keyNode)) {\r
+      throwError(state, 'duplicated mapping key');\r
+    }\r
+    _result[keyNode] = valueNode;\r
+    delete overridableKeys[keyNode];\r
+  }\r
+\r
+  return _result;\r
+}\r
+\r
+function readLineBreak(state) {\r
+  var ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch === 0x0A/* LF */) {\r
+    state.position++;\r
+  } else if (ch === 0x0D/* CR */) {\r
+    state.position++;\r
+    if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {\r
+      state.position++;\r
+    }\r
+  } else {\r
+    throwError(state, 'a line break is expected');\r
+  }\r
+\r
+  state.line += 1;\r
+  state.lineStart = state.position;\r
+}\r
+\r
+function skipSeparationSpace(state, allowComments, checkIndent) {\r
+  var lineBreaks = 0,\r
+      ch = state.input.charCodeAt(state.position);\r
+\r
+  while (ch !== 0) {\r
+    while (is_WHITE_SPACE(ch)) {\r
+      ch = state.input.charCodeAt(++state.position);\r
+    }\r
+\r
+    if (allowComments && ch === 0x23/* # */) {\r
+      do {\r
+        ch = state.input.charCodeAt(++state.position);\r
+      } while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0);\r
+    }\r
+\r
+    if (is_EOL(ch)) {\r
+      readLineBreak(state);\r
+\r
+      ch = state.input.charCodeAt(state.position);\r
+      lineBreaks++;\r
+      state.lineIndent = 0;\r
+\r
+      while (ch === 0x20/* Space */) {\r
+        state.lineIndent++;\r
+        ch = state.input.charCodeAt(++state.position);\r
+      }\r
+    } else {\r
+      break;\r
+    }\r
+  }\r
+\r
+  if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {\r
+    throwWarning(state, 'deficient indentation');\r
+  }\r
+\r
+  return lineBreaks;\r
+}\r
+\r
+function testDocumentSeparator(state) {\r
+  var _position = state.position,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(_position);\r
+\r
+  // Condition state.position === state.lineStart is tested\r
+  // in parent on each call, for efficiency. No needs to test here again.\r
+  if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&\r
+      ch === state.input.charCodeAt(_position + 1) &&\r
+      ch === state.input.charCodeAt(_position + 2)) {\r
+\r
+    _position += 3;\r
+\r
+    ch = state.input.charCodeAt(_position);\r
+\r
+    if (ch === 0 || is_WS_OR_EOL(ch)) {\r
+      return true;\r
+    }\r
+  }\r
+\r
+  return false;\r
+}\r
+\r
+function writeFoldedLines(state, count) {\r
+  if (count === 1) {\r
+    state.result += ' ';\r
+  } else if (count > 1) {\r
+    state.result += common.repeat('\n', count - 1);\r
+  }\r
+}\r
+\r
+\r
+function readPlainScalar(state, nodeIndent, withinFlowCollection) {\r
+  var preceding,\r
+      following,\r
+      captureStart,\r
+      captureEnd,\r
+      hasPendingContent,\r
+      _line,\r
+      _lineStart,\r
+      _lineIndent,\r
+      _kind = state.kind,\r
+      _result = state.result,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (is_WS_OR_EOL(ch)      ||\r
+      is_FLOW_INDICATOR(ch) ||\r
+      ch === 0x23/* # */    ||\r
+      ch === 0x26/* & */    ||\r
+      ch === 0x2A/* * */    ||\r
+      ch === 0x21/* ! */    ||\r
+      ch === 0x7C/* | */    ||\r
+      ch === 0x3E/* > */    ||\r
+      ch === 0x27/* ' */    ||\r
+      ch === 0x22/* " */    ||\r
+      ch === 0x25/* % */    ||\r
+      ch === 0x40/* @ */    ||\r
+      ch === 0x60/* ` */) {\r
+    return false;\r
+  }\r
+\r
+  if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {\r
+    following = state.input.charCodeAt(state.position + 1);\r
+\r
+    if (is_WS_OR_EOL(following) ||\r
+        withinFlowCollection && is_FLOW_INDICATOR(following)) {\r
+      return false;\r
+    }\r
+  }\r
+\r
+  state.kind = 'scalar';\r
+  state.result = '';\r
+  captureStart = captureEnd = state.position;\r
+  hasPendingContent = false;\r
+\r
+  while (ch !== 0) {\r
+    if (ch === 0x3A/* : */) {\r
+      following = state.input.charCodeAt(state.position + 1);\r
+\r
+      if (is_WS_OR_EOL(following) ||\r
+          withinFlowCollection && is_FLOW_INDICATOR(following)) {\r
+        break;\r
+      }\r
+\r
+    } else if (ch === 0x23/* # */) {\r
+      preceding = state.input.charCodeAt(state.position - 1);\r
+\r
+      if (is_WS_OR_EOL(preceding)) {\r
+        break;\r
+      }\r
+\r
+    } else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||\r
+               withinFlowCollection && is_FLOW_INDICATOR(ch)) {\r
+      break;\r
+\r
+    } else if (is_EOL(ch)) {\r
+      _line = state.line;\r
+      _lineStart = state.lineStart;\r
+      _lineIndent = state.lineIndent;\r
+      skipSeparationSpace(state, false, -1);\r
+\r
+      if (state.lineIndent >= nodeIndent) {\r
+        hasPendingContent = true;\r
+        ch = state.input.charCodeAt(state.position);\r
+        continue;\r
+      } else {\r
+        state.position = captureEnd;\r
+        state.line = _line;\r
+        state.lineStart = _lineStart;\r
+        state.lineIndent = _lineIndent;\r
+        break;\r
+      }\r
+    }\r
+\r
+    if (hasPendingContent) {\r
+      captureSegment(state, captureStart, captureEnd, false);\r
+      writeFoldedLines(state, state.line - _line);\r
+      captureStart = captureEnd = state.position;\r
+      hasPendingContent = false;\r
+    }\r
+\r
+    if (!is_WHITE_SPACE(ch)) {\r
+      captureEnd = state.position + 1;\r
+    }\r
+\r
+    ch = state.input.charCodeAt(++state.position);\r
+  }\r
+\r
+  captureSegment(state, captureStart, captureEnd, false);\r
+\r
+  if (state.result) {\r
+    return true;\r
+  }\r
+\r
+  state.kind = _kind;\r
+  state.result = _result;\r
+  return false;\r
+}\r
+\r
+function readSingleQuotedScalar(state, nodeIndent) {\r
+  var ch,\r
+      captureStart, captureEnd;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch !== 0x27/* ' */) {\r
+    return false;\r
+  }\r
+\r
+  state.kind = 'scalar';\r
+  state.result = '';\r
+  state.position++;\r
+  captureStart = captureEnd = state.position;\r
+\r
+  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\r
+    if (ch === 0x27/* ' */) {\r
+      captureSegment(state, captureStart, state.position, true);\r
+      ch = state.input.charCodeAt(++state.position);\r
+\r
+      if (ch === 0x27/* ' */) {\r
+        captureStart = captureEnd = state.position;\r
+        state.position++;\r
+      } else {\r
+        return true;\r
+      }\r
+\r
+    } else if (is_EOL(ch)) {\r
+      captureSegment(state, captureStart, captureEnd, true);\r
+      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\r
+      captureStart = captureEnd = state.position;\r
+\r
+    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\r
+      throwError(state, 'unexpected end of the document within a single quoted scalar');\r
+\r
+    } else {\r
+      state.position++;\r
+      captureEnd = state.position;\r
+    }\r
+  }\r
+\r
+  throwError(state, 'unexpected end of the stream within a single quoted scalar');\r
+}\r
+\r
+function readDoubleQuotedScalar(state, nodeIndent) {\r
+  var captureStart,\r
+      captureEnd,\r
+      hexLength,\r
+      hexResult,\r
+      tmp,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch !== 0x22/* " */) {\r
+    return false;\r
+  }\r
+\r
+  state.kind = 'scalar';\r
+  state.result = '';\r
+  state.position++;\r
+  captureStart = captureEnd = state.position;\r
+\r
+  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\r
+    if (ch === 0x22/* " */) {\r
+      captureSegment(state, captureStart, state.position, true);\r
+      state.position++;\r
+      return true;\r
+\r
+    } else if (ch === 0x5C/* \ */) {\r
+      captureSegment(state, captureStart, state.position, true);\r
+      ch = state.input.charCodeAt(++state.position);\r
+\r
+      if (is_EOL(ch)) {\r
+        skipSeparationSpace(state, false, nodeIndent);\r
+\r
+        // TODO: rework to inline fn with no type cast?\r
+      } else if (ch < 256 && simpleEscapeCheck[ch]) {\r
+        state.result += simpleEscapeMap[ch];\r
+        state.position++;\r
+\r
+      } else if ((tmp = escapedHexLen(ch)) > 0) {\r
+        hexLength = tmp;\r
+        hexResult = 0;\r
+\r
+        for (; hexLength > 0; hexLength--) {\r
+          ch = state.input.charCodeAt(++state.position);\r
+\r
+          if ((tmp = fromHexCode(ch)) >= 0) {\r
+            hexResult = (hexResult << 4) + tmp;\r
+\r
+          } else {\r
+            throwError(state, 'expected hexadecimal character');\r
+          }\r
+        }\r
+\r
+        state.result += charFromCodepoint(hexResult);\r
+\r
+        state.position++;\r
+\r
+      } else {\r
+        throwError(state, 'unknown escape sequence');\r
+      }\r
+\r
+      captureStart = captureEnd = state.position;\r
+\r
+    } else if (is_EOL(ch)) {\r
+      captureSegment(state, captureStart, captureEnd, true);\r
+      writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));\r
+      captureStart = captureEnd = state.position;\r
+\r
+    } else if (state.position === state.lineStart && testDocumentSeparator(state)) {\r
+      throwError(state, 'unexpected end of the document within a double quoted scalar');\r
+\r
+    } else {\r
+      state.position++;\r
+      captureEnd = state.position;\r
+    }\r
+  }\r
+\r
+  throwError(state, 'unexpected end of the stream within a double quoted scalar');\r
+}\r
+\r
+function readFlowCollection(state, nodeIndent) {\r
+  var readNext = true,\r
+      _line,\r
+      _tag     = state.tag,\r
+      _result,\r
+      _anchor  = state.anchor,\r
+      following,\r
+      terminator,\r
+      isPair,\r
+      isExplicitPair,\r
+      isMapping,\r
+      overridableKeys = {},\r
+      keyNode,\r
+      keyTag,\r
+      valueNode,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch === 0x5B/* [ */) {\r
+    terminator = 0x5D;/* ] */\r
+    isMapping = false;\r
+    _result = [];\r
+  } else if (ch === 0x7B/* { */) {\r
+    terminator = 0x7D;/* } */\r
+    isMapping = true;\r
+    _result = {};\r
+  } else {\r
+    return false;\r
+  }\r
+\r
+  if (state.anchor !== null) {\r
+    state.anchorMap[state.anchor] = _result;\r
+  }\r
+\r
+  ch = state.input.charCodeAt(++state.position);\r
+\r
+  while (ch !== 0) {\r
+    skipSeparationSpace(state, true, nodeIndent);\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    if (ch === terminator) {\r
+      state.position++;\r
+      state.tag = _tag;\r
+      state.anchor = _anchor;\r
+      state.kind = isMapping ? 'mapping' : 'sequence';\r
+      state.result = _result;\r
+      return true;\r
+    } else if (!readNext) {\r
+      throwError(state, 'missed comma between flow collection entries');\r
+    }\r
+\r
+    keyTag = keyNode = valueNode = null;\r
+    isPair = isExplicitPair = false;\r
+\r
+    if (ch === 0x3F/* ? */) {\r
+      following = state.input.charCodeAt(state.position + 1);\r
+\r
+      if (is_WS_OR_EOL(following)) {\r
+        isPair = isExplicitPair = true;\r
+        state.position++;\r
+        skipSeparationSpace(state, true, nodeIndent);\r
+      }\r
+    }\r
+\r
+    _line = state.line;\r
+    composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\r
+    keyTag = state.tag;\r
+    keyNode = state.result;\r
+    skipSeparationSpace(state, true, nodeIndent);\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {\r
+      isPair = true;\r
+      ch = state.input.charCodeAt(++state.position);\r
+      skipSeparationSpace(state, true, nodeIndent);\r
+      composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);\r
+      valueNode = state.result;\r
+    }\r
+\r
+    if (isMapping) {\r
+      storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\r
+    } else if (isPair) {\r
+      _result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode));\r
+    } else {\r
+      _result.push(keyNode);\r
+    }\r
+\r
+    skipSeparationSpace(state, true, nodeIndent);\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    if (ch === 0x2C/* , */) {\r
+      readNext = true;\r
+      ch = state.input.charCodeAt(++state.position);\r
+    } else {\r
+      readNext = false;\r
+    }\r
+  }\r
+\r
+  throwError(state, 'unexpected end of the stream within a flow collection');\r
+}\r
+\r
+function readBlockScalar(state, nodeIndent) {\r
+  var captureStart,\r
+      folding,\r
+      chomping       = CHOMPING_CLIP,\r
+      detectedIndent = false,\r
+      textIndent     = nodeIndent,\r
+      emptyLines     = 0,\r
+      atMoreIndented = false,\r
+      tmp,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch === 0x7C/* | */) {\r
+    folding = false;\r
+  } else if (ch === 0x3E/* > */) {\r
+    folding = true;\r
+  } else {\r
+    return false;\r
+  }\r
+\r
+  state.kind = 'scalar';\r
+  state.result = '';\r
+\r
+  while (ch !== 0) {\r
+    ch = state.input.charCodeAt(++state.position);\r
+\r
+    if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {\r
+      if (CHOMPING_CLIP === chomping) {\r
+        chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP;\r
+      } else {\r
+        throwError(state, 'repeat of a chomping mode identifier');\r
+      }\r
+\r
+    } else if ((tmp = fromDecimalCode(ch)) >= 0) {\r
+      if (tmp === 0) {\r
+        throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one');\r
+      } else if (!detectedIndent) {\r
+        textIndent = nodeIndent + tmp - 1;\r
+        detectedIndent = true;\r
+      } else {\r
+        throwError(state, 'repeat of an indentation width identifier');\r
+      }\r
+\r
+    } else {\r
+      break;\r
+    }\r
+  }\r
+\r
+  if (is_WHITE_SPACE(ch)) {\r
+    do { ch = state.input.charCodeAt(++state.position); }\r
+    while (is_WHITE_SPACE(ch));\r
+\r
+    if (ch === 0x23/* # */) {\r
+      do { ch = state.input.charCodeAt(++state.position); }\r
+      while (!is_EOL(ch) && (ch !== 0));\r
+    }\r
+  }\r
+\r
+  while (ch !== 0) {\r
+    readLineBreak(state);\r
+    state.lineIndent = 0;\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    while ((!detectedIndent || state.lineIndent < textIndent) &&\r
+           (ch === 0x20/* Space */)) {\r
+      state.lineIndent++;\r
+      ch = state.input.charCodeAt(++state.position);\r
+    }\r
+\r
+    if (!detectedIndent && state.lineIndent > textIndent) {\r
+      textIndent = state.lineIndent;\r
+    }\r
+\r
+    if (is_EOL(ch)) {\r
+      emptyLines++;\r
+      continue;\r
+    }\r
+\r
+    // End of the scalar.\r
+    if (state.lineIndent < textIndent) {\r
+\r
+      // Perform the chomping.\r
+      if (chomping === CHOMPING_KEEP) {\r
+        state.result += common.repeat('\n', emptyLines);\r
+      } else if (chomping === CHOMPING_CLIP) {\r
+        if (detectedIndent) { // i.e. only if the scalar is not empty.\r
+          state.result += '\n';\r
+        }\r
+      }\r
+\r
+      // Break this `while` cycle and go to the funciton's epilogue.\r
+      break;\r
+    }\r
+\r
+    // Folded style: use fancy rules to handle line breaks.\r
+    if (folding) {\r
+\r
+      // Lines starting with white space characters (more-indented lines) are not folded.\r
+      if (is_WHITE_SPACE(ch)) {\r
+        atMoreIndented = true;\r
+        state.result += common.repeat('\n', emptyLines + 1);\r
+\r
+      // End of more-indented block.\r
+      } else if (atMoreIndented) {\r
+        atMoreIndented = false;\r
+        state.result += common.repeat('\n', emptyLines + 1);\r
+\r
+      // Just one line break - perceive as the same line.\r
+      } else if (emptyLines === 0) {\r
+        if (detectedIndent) { // i.e. only if we have already read some scalar content.\r
+          state.result += ' ';\r
+        }\r
+\r
+      // Several line breaks - perceive as different lines.\r
+      } else {\r
+        state.result += common.repeat('\n', emptyLines);\r
+      }\r
+\r
+    // Literal style: just add exact number of line breaks between content lines.\r
+    } else if (detectedIndent) {\r
+      // If current line isn't the first one - count line break from the last content line.\r
+      state.result += common.repeat('\n', emptyLines + 1);\r
+    } else {\r
+      // In case of the first content line - count only empty lines.\r
+      state.result += common.repeat('\n', emptyLines);\r
+    }\r
+\r
+    detectedIndent = true;\r
+    emptyLines = 0;\r
+    captureStart = state.position;\r
+\r
+    while (!is_EOL(ch) && (ch !== 0)) {\r
+      ch = state.input.charCodeAt(++state.position);\r
+    }\r
+\r
+    captureSegment(state, captureStart, state.position, false);\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function readBlockSequence(state, nodeIndent) {\r
+  var _line,\r
+      _tag      = state.tag,\r
+      _anchor   = state.anchor,\r
+      _result   = [],\r
+      following,\r
+      detected  = false,\r
+      ch;\r
+\r
+  if (state.anchor !== null) {\r
+    state.anchorMap[state.anchor] = _result;\r
+  }\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  while (ch !== 0) {\r
+\r
+    if (ch !== 0x2D/* - */) {\r
+      break;\r
+    }\r
+\r
+    following = state.input.charCodeAt(state.position + 1);\r
+\r
+    if (!is_WS_OR_EOL(following)) {\r
+      break;\r
+    }\r
+\r
+    detected = true;\r
+    state.position++;\r
+\r
+    if (skipSeparationSpace(state, true, -1)) {\r
+      if (state.lineIndent <= nodeIndent) {\r
+        _result.push(null);\r
+        ch = state.input.charCodeAt(state.position);\r
+        continue;\r
+      }\r
+    }\r
+\r
+    _line = state.line;\r
+    composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);\r
+    _result.push(state.result);\r
+    skipSeparationSpace(state, true, -1);\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {\r
+      throwError(state, 'bad indentation of a sequence entry');\r
+    } else if (state.lineIndent < nodeIndent) {\r
+      break;\r
+    }\r
+  }\r
+\r
+  if (detected) {\r
+    state.tag = _tag;\r
+    state.anchor = _anchor;\r
+    state.kind = 'sequence';\r
+    state.result = _result;\r
+    return true;\r
+  }\r
+  return false;\r
+}\r
+\r
+function readBlockMapping(state, nodeIndent, flowIndent) {\r
+  var following,\r
+      allowCompact,\r
+      _line,\r
+      _tag          = state.tag,\r
+      _anchor       = state.anchor,\r
+      _result       = {},\r
+      overridableKeys = {},\r
+      keyTag        = null,\r
+      keyNode       = null,\r
+      valueNode     = null,\r
+      atExplicitKey = false,\r
+      detected      = false,\r
+      ch;\r
+\r
+  if (state.anchor !== null) {\r
+    state.anchorMap[state.anchor] = _result;\r
+  }\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  while (ch !== 0) {\r
+    following = state.input.charCodeAt(state.position + 1);\r
+    _line = state.line; // Save the current line.\r
+\r
+    //\r
+    // Explicit notation case. There are two separate blocks:\r
+    // first for the key (denoted by "?") and second for the value (denoted by ":")\r
+    //\r
+    if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && is_WS_OR_EOL(following)) {\r
+\r
+      if (ch === 0x3F/* ? */) {\r
+        if (atExplicitKey) {\r
+          storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\r
+          keyTag = keyNode = valueNode = null;\r
+        }\r
+\r
+        detected = true;\r
+        atExplicitKey = true;\r
+        allowCompact = true;\r
+\r
+      } else if (atExplicitKey) {\r
+        // i.e. 0x3A/* : */ === character after the explicit key.\r
+        atExplicitKey = false;\r
+        allowCompact = true;\r
+\r
+      } else {\r
+        throwError(state, 'incomplete explicit mapping pair; a key node is missed');\r
+      }\r
+\r
+      state.position += 1;\r
+      ch = following;\r
+\r
+    //\r
+    // Implicit notation case. Flow-style node as the key first, then ":", and the value.\r
+    //\r
+    } else if (composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {\r
+\r
+      if (state.line === _line) {\r
+        ch = state.input.charCodeAt(state.position);\r
+\r
+        while (is_WHITE_SPACE(ch)) {\r
+          ch = state.input.charCodeAt(++state.position);\r
+        }\r
+\r
+        if (ch === 0x3A/* : */) {\r
+          ch = state.input.charCodeAt(++state.position);\r
+\r
+          if (!is_WS_OR_EOL(ch)) {\r
+            throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping');\r
+          }\r
+\r
+          if (atExplicitKey) {\r
+            storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\r
+            keyTag = keyNode = valueNode = null;\r
+          }\r
+\r
+          detected = true;\r
+          atExplicitKey = false;\r
+          allowCompact = false;\r
+          keyTag = state.tag;\r
+          keyNode = state.result;\r
+\r
+        } else if (detected) {\r
+          throwError(state, 'can not read an implicit mapping pair; a colon is missed');\r
+\r
+        } else {\r
+          state.tag = _tag;\r
+          state.anchor = _anchor;\r
+          return true; // Keep the result of `composeNode`.\r
+        }\r
+\r
+      } else if (detected) {\r
+        throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key');\r
+\r
+      } else {\r
+        state.tag = _tag;\r
+        state.anchor = _anchor;\r
+        return true; // Keep the result of `composeNode`.\r
+      }\r
+\r
+    } else {\r
+      break; // Reading is done. Go to the epilogue.\r
+    }\r
+\r
+    //\r
+    // Common reading code for both explicit and implicit notations.\r
+    //\r
+    if (state.line === _line || state.lineIndent > nodeIndent) {\r
+      if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {\r
+        if (atExplicitKey) {\r
+          keyNode = state.result;\r
+        } else {\r
+          valueNode = state.result;\r
+        }\r
+      }\r
+\r
+      if (!atExplicitKey) {\r
+        storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode);\r
+        keyTag = keyNode = valueNode = null;\r
+      }\r
+\r
+      skipSeparationSpace(state, true, -1);\r
+      ch = state.input.charCodeAt(state.position);\r
+    }\r
+\r
+    if (state.lineIndent > nodeIndent && (ch !== 0)) {\r
+      throwError(state, 'bad indentation of a mapping entry');\r
+    } else if (state.lineIndent < nodeIndent) {\r
+      break;\r
+    }\r
+  }\r
+\r
+  //\r
+  // Epilogue.\r
+  //\r
+\r
+  // Special case: last mapping's node contains only the key in explicit notation.\r
+  if (atExplicitKey) {\r
+    storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null);\r
+  }\r
+\r
+  // Expose the resulting mapping.\r
+  if (detected) {\r
+    state.tag = _tag;\r
+    state.anchor = _anchor;\r
+    state.kind = 'mapping';\r
+    state.result = _result;\r
+  }\r
+\r
+  return detected;\r
+}\r
+\r
+function readTagProperty(state) {\r
+  var _position,\r
+      isVerbatim = false,\r
+      isNamed    = false,\r
+      tagHandle,\r
+      tagName,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch !== 0x21/* ! */) return false;\r
+\r
+  if (state.tag !== null) {\r
+    throwError(state, 'duplication of a tag property');\r
+  }\r
+\r
+  ch = state.input.charCodeAt(++state.position);\r
+\r
+  if (ch === 0x3C/* < */) {\r
+    isVerbatim = true;\r
+    ch = state.input.charCodeAt(++state.position);\r
+\r
+  } else if (ch === 0x21/* ! */) {\r
+    isNamed = true;\r
+    tagHandle = '!!';\r
+    ch = state.input.charCodeAt(++state.position);\r
+\r
+  } else {\r
+    tagHandle = '!';\r
+  }\r
+\r
+  _position = state.position;\r
+\r
+  if (isVerbatim) {\r
+    do { ch = state.input.charCodeAt(++state.position); }\r
+    while (ch !== 0 && ch !== 0x3E/* > */);\r
+\r
+    if (state.position < state.length) {\r
+      tagName = state.input.slice(_position, state.position);\r
+      ch = state.input.charCodeAt(++state.position);\r
+    } else {\r
+      throwError(state, 'unexpected end of the stream within a verbatim tag');\r
+    }\r
+  } else {\r
+    while (ch !== 0 && !is_WS_OR_EOL(ch)) {\r
+\r
+      if (ch === 0x21/* ! */) {\r
+        if (!isNamed) {\r
+          tagHandle = state.input.slice(_position - 1, state.position + 1);\r
+\r
+          if (!PATTERN_TAG_HANDLE.test(tagHandle)) {\r
+            throwError(state, 'named tag handle cannot contain such characters');\r
+          }\r
+\r
+          isNamed = true;\r
+          _position = state.position + 1;\r
+        } else {\r
+          throwError(state, 'tag suffix cannot contain exclamation marks');\r
+        }\r
+      }\r
+\r
+      ch = state.input.charCodeAt(++state.position);\r
+    }\r
+\r
+    tagName = state.input.slice(_position, state.position);\r
+\r
+    if (PATTERN_FLOW_INDICATORS.test(tagName)) {\r
+      throwError(state, 'tag suffix cannot contain flow indicator characters');\r
+    }\r
+  }\r
+\r
+  if (tagName && !PATTERN_TAG_URI.test(tagName)) {\r
+    throwError(state, 'tag name cannot contain such characters: ' + tagName);\r
+  }\r
+\r
+  if (isVerbatim) {\r
+    state.tag = tagName;\r
+\r
+  } else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {\r
+    state.tag = state.tagMap[tagHandle] + tagName;\r
+\r
+  } else if (tagHandle === '!') {\r
+    state.tag = '!' + tagName;\r
+\r
+  } else if (tagHandle === '!!') {\r
+    state.tag = 'tag:yaml.org,2002:' + tagName;\r
+\r
+  } else {\r
+    throwError(state, 'undeclared tag handle "' + tagHandle + '"');\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function readAnchorProperty(state) {\r
+  var _position,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch !== 0x26/* & */) return false;\r
+\r
+  if (state.anchor !== null) {\r
+    throwError(state, 'duplication of an anchor property');\r
+  }\r
+\r
+  ch = state.input.charCodeAt(++state.position);\r
+  _position = state.position;\r
+\r
+  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\r
+    ch = state.input.charCodeAt(++state.position);\r
+  }\r
+\r
+  if (state.position === _position) {\r
+    throwError(state, 'name of an anchor node must contain at least one character');\r
+  }\r
+\r
+  state.anchor = state.input.slice(_position, state.position);\r
+  return true;\r
+}\r
+\r
+function readAlias(state) {\r
+  var _position, alias,\r
+      ch;\r
+\r
+  ch = state.input.charCodeAt(state.position);\r
+\r
+  if (ch !== 0x2A/* * */) return false;\r
+\r
+  ch = state.input.charCodeAt(++state.position);\r
+  _position = state.position;\r
+\r
+  while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {\r
+    ch = state.input.charCodeAt(++state.position);\r
+  }\r
+\r
+  if (state.position === _position) {\r
+    throwError(state, 'name of an alias node must contain at least one character');\r
+  }\r
+\r
+  alias = state.input.slice(_position, state.position);\r
+\r
+  if (!state.anchorMap.hasOwnProperty(alias)) {\r
+    throwError(state, 'unidentified alias "' + alias + '"');\r
+  }\r
+\r
+  state.result = state.anchorMap[alias];\r
+  skipSeparationSpace(state, true, -1);\r
+  return true;\r
+}\r
+\r
+function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {\r
+  var allowBlockStyles,\r
+      allowBlockScalars,\r
+      allowBlockCollections,\r
+      indentStatus = 1, // 1: this>parent, 0: this=parent, -1: this<parent\r
+      atNewLine  = false,\r
+      hasContent = false,\r
+      typeIndex,\r
+      typeQuantity,\r
+      type,\r
+      flowIndent,\r
+      blockIndent;\r
+\r
+  if (state.listener !== null) {\r
+    state.listener('open', state);\r
+  }\r
+\r
+  state.tag    = null;\r
+  state.anchor = null;\r
+  state.kind   = null;\r
+  state.result = null;\r
+\r
+  allowBlockStyles = allowBlockScalars = allowBlockCollections =\r
+    CONTEXT_BLOCK_OUT === nodeContext ||\r
+    CONTEXT_BLOCK_IN  === nodeContext;\r
+\r
+  if (allowToSeek) {\r
+    if (skipSeparationSpace(state, true, -1)) {\r
+      atNewLine = true;\r
+\r
+      if (state.lineIndent > parentIndent) {\r
+        indentStatus = 1;\r
+      } else if (state.lineIndent === parentIndent) {\r
+        indentStatus = 0;\r
+      } else if (state.lineIndent < parentIndent) {\r
+        indentStatus = -1;\r
+      }\r
+    }\r
+  }\r
+\r
+  if (indentStatus === 1) {\r
+    while (readTagProperty(state) || readAnchorProperty(state)) {\r
+      if (skipSeparationSpace(state, true, -1)) {\r
+        atNewLine = true;\r
+        allowBlockCollections = allowBlockStyles;\r
+\r
+        if (state.lineIndent > parentIndent) {\r
+          indentStatus = 1;\r
+        } else if (state.lineIndent === parentIndent) {\r
+          indentStatus = 0;\r
+        } else if (state.lineIndent < parentIndent) {\r
+          indentStatus = -1;\r
+        }\r
+      } else {\r
+        allowBlockCollections = false;\r
+      }\r
+    }\r
+  }\r
+\r
+  if (allowBlockCollections) {\r
+    allowBlockCollections = atNewLine || allowCompact;\r
+  }\r
+\r
+  if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {\r
+    if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {\r
+      flowIndent = parentIndent;\r
+    } else {\r
+      flowIndent = parentIndent + 1;\r
+    }\r
+\r
+    blockIndent = state.position - state.lineStart;\r
+\r
+    if (indentStatus === 1) {\r
+      if (allowBlockCollections &&\r
+          (readBlockSequence(state, blockIndent) ||\r
+           readBlockMapping(state, blockIndent, flowIndent)) ||\r
+          readFlowCollection(state, flowIndent)) {\r
+        hasContent = true;\r
+      } else {\r
+        if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||\r
+            readSingleQuotedScalar(state, flowIndent) ||\r
+            readDoubleQuotedScalar(state, flowIndent)) {\r
+          hasContent = true;\r
+\r
+        } else if (readAlias(state)) {\r
+          hasContent = true;\r
+\r
+          if (state.tag !== null || state.anchor !== null) {\r
+            throwError(state, 'alias node should not have any properties');\r
+          }\r
+\r
+        } else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {\r
+          hasContent = true;\r
+\r
+          if (state.tag === null) {\r
+            state.tag = '?';\r
+          }\r
+        }\r
+\r
+        if (state.anchor !== null) {\r
+          state.anchorMap[state.anchor] = state.result;\r
+        }\r
+      }\r
+    } else if (indentStatus === 0) {\r
+      // Special case: block sequences are allowed to have same indentation level as the parent.\r
+      // http://www.yaml.org/spec/1.2/spec.html#id2799784\r
+      hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);\r
+    }\r
+  }\r
+\r
+  if (state.tag !== null && state.tag !== '!') {\r
+    if (state.tag === '?') {\r
+      for (typeIndex = 0, typeQuantity = state.implicitTypes.length;\r
+           typeIndex < typeQuantity;\r
+           typeIndex += 1) {\r
+        type = state.implicitTypes[typeIndex];\r
+\r
+        // Implicit resolving is not allowed for non-scalar types, and '?'\r
+        // non-specific tag is only assigned to plain scalars. So, it isn't\r
+        // needed to check for 'kind' conformity.\r
+\r
+        if (type.resolve(state.result)) { // `state.result` updated in resolver if matched\r
+          state.result = type.construct(state.result);\r
+          state.tag = type.tag;\r
+          if (state.anchor !== null) {\r
+            state.anchorMap[state.anchor] = state.result;\r
+          }\r
+          break;\r
+        }\r
+      }\r
+    } else if (_hasOwnProperty.call(state.typeMap, state.tag)) {\r
+      type = state.typeMap[state.tag];\r
+\r
+      if (state.result !== null && type.kind !== state.kind) {\r
+        throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');\r
+      }\r
+\r
+      if (!type.resolve(state.result)) { // `state.result` updated in resolver if matched\r
+        throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag');\r
+      } else {\r
+        state.result = type.construct(state.result);\r
+        if (state.anchor !== null) {\r
+          state.anchorMap[state.anchor] = state.result;\r
+        }\r
+      }\r
+    } else {\r
+      throwError(state, 'unknown tag !<' + state.tag + '>');\r
+    }\r
+  }\r
+\r
+  if (state.listener !== null) {\r
+    state.listener('close', state);\r
+  }\r
+  return state.tag !== null ||  state.anchor !== null || hasContent;\r
+}\r
+\r
+function readDocument(state) {\r
+  var documentStart = state.position,\r
+      _position,\r
+      directiveName,\r
+      directiveArgs,\r
+      hasDirectives = false,\r
+      ch;\r
+\r
+  state.version = null;\r
+  state.checkLineBreaks = state.legacy;\r
+  state.tagMap = {};\r
+  state.anchorMap = {};\r
+\r
+  while ((ch = state.input.charCodeAt(state.position)) !== 0) {\r
+    skipSeparationSpace(state, true, -1);\r
+\r
+    ch = state.input.charCodeAt(state.position);\r
+\r
+    if (state.lineIndent > 0 || ch !== 0x25/* % */) {\r
+      break;\r
+    }\r
+\r
+    hasDirectives = true;\r
+    ch = state.input.charCodeAt(++state.position);\r
+    _position = state.position;\r
+\r
+    while (ch !== 0 && !is_WS_OR_EOL(ch)) {\r
+      ch = state.input.charCodeAt(++state.position);\r
+    }\r
+\r
+    directiveName = state.input.slice(_position, state.position);\r
+    directiveArgs = [];\r
+\r
+    if (directiveName.length < 1) {\r
+      throwError(state, 'directive name must not be less than one character in length');\r
+    }\r
+\r
+    while (ch !== 0) {\r
+      while (is_WHITE_SPACE(ch)) {\r
+        ch = state.input.charCodeAt(++state.position);\r
+      }\r
+\r
+      if (ch === 0x23/* # */) {\r
+        do { ch = state.input.charCodeAt(++state.position); }\r
+        while (ch !== 0 && !is_EOL(ch));\r
+        break;\r
+      }\r
+\r
+      if (is_EOL(ch)) break;\r
+\r
+      _position = state.position;\r
+\r
+      while (ch !== 0 && !is_WS_OR_EOL(ch)) {\r
+        ch = state.input.charCodeAt(++state.position);\r
+      }\r
+\r
+      directiveArgs.push(state.input.slice(_position, state.position));\r
+    }\r
+\r
+    if (ch !== 0) readLineBreak(state);\r
+\r
+    if (_hasOwnProperty.call(directiveHandlers, directiveName)) {\r
+      directiveHandlers[directiveName](state, directiveName, directiveArgs);\r
+    } else {\r
+      throwWarning(state, 'unknown document directive "' + directiveName + '"');\r
+    }\r
+  }\r
+\r
+  skipSeparationSpace(state, true, -1);\r
+\r
+  if (state.lineIndent === 0 &&\r
+      state.input.charCodeAt(state.position)     === 0x2D/* - */ &&\r
+      state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&\r
+      state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {\r
+    state.position += 3;\r
+    skipSeparationSpace(state, true, -1);\r
+\r
+  } else if (hasDirectives) {\r
+    throwError(state, 'directives end mark is expected');\r
+  }\r
+\r
+  composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);\r
+  skipSeparationSpace(state, true, -1);\r
+\r
+  if (state.checkLineBreaks &&\r
+      PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {\r
+    throwWarning(state, 'non-ASCII line breaks are interpreted as content');\r
+  }\r
+\r
+  state.documents.push(state.result);\r
+\r
+  if (state.position === state.lineStart && testDocumentSeparator(state)) {\r
+\r
+    if (state.input.charCodeAt(state.position) === 0x2E/* . */) {\r
+      state.position += 3;\r
+      skipSeparationSpace(state, true, -1);\r
+    }\r
+    return;\r
+  }\r
+\r
+  if (state.position < (state.length - 1)) {\r
+    throwError(state, 'end of the stream or a document separator is expected');\r
+  } else {\r
+    return;\r
+  }\r
+}\r
+\r
+\r
+function loadDocuments(input, options) {\r
+  input = String(input);\r
+  options = options || {};\r
+\r
+  if (input.length !== 0) {\r
+\r
+    // Add tailing `\n` if not exists\r
+    if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&\r
+        input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {\r
+      input += '\n';\r
+    }\r
+\r
+    // Strip BOM\r
+    if (input.charCodeAt(0) === 0xFEFF) {\r
+      input = input.slice(1);\r
+    }\r
+  }\r
+\r
+  var state = new State(input, options);\r
+\r
+  // Use 0 as string terminator. That significantly simplifies bounds check.\r
+  state.input += '\0';\r
+\r
+  while (state.input.charCodeAt(state.position) === 0x20/* Space */) {\r
+    state.lineIndent += 1;\r
+    state.position += 1;\r
+  }\r
+\r
+  while (state.position < (state.length - 1)) {\r
+    readDocument(state);\r
+  }\r
+\r
+  return state.documents;\r
+}\r
+\r
+\r
+function loadAll(input, iterator, options) {\r
+  var documents = loadDocuments(input, options), index, length;\r
+\r
+  for (index = 0, length = documents.length; index < length; index += 1) {\r
+    iterator(documents[index]);\r
+  }\r
+}\r
+\r
+\r
+function load(input, options) {\r
+  var documents = loadDocuments(input, options);\r
+\r
+  if (documents.length === 0) {\r
+    /*eslint-disable no-undefined*/\r
+    return undefined;\r
+  } else if (documents.length === 1) {\r
+    return documents[0];\r
+  }\r
+  throw new YAMLException('expected a single document in the stream, but found more');\r
+}\r
+\r
+\r
+function safeLoadAll(input, output, options) {\r
+  loadAll(input, output, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\r
+}\r
+\r
+\r
+function safeLoad(input, options) {\r
+  return load(input, common.extend({ schema: DEFAULT_SAFE_SCHEMA }, options));\r
+}\r
+\r
+\r
+module.exports.loadAll     = loadAll;\r
+module.exports.load        = load;\r
+module.exports.safeLoadAll = safeLoadAll;\r
+module.exports.safeLoad    = safeLoad;\r
+\r
+},{"./common":23,"./exception":25,"./mark":27,"./schema/default_full":30,"./schema/default_safe":31}],27:[function(require,module,exports){\r
+'use strict';\r
+\r
+\r
+var common = require('./common');\r
+\r
+\r
+function Mark(name, buffer, position, line, column) {\r
+  this.name     = name;\r
+  this.buffer   = buffer;\r
+  this.position = position;\r
+  this.line     = line;\r
+  this.column   = column;\r
+}\r
+\r
+\r
+Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {\r
+  var head, start, tail, end, snippet;\r
+\r
+  if (!this.buffer) return null;\r
+\r
+  indent = indent || 4;\r
+  maxLength = maxLength || 75;\r
+\r
+  head = '';\r
+  start = this.position;\r
+\r
+  while (start > 0 && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(start - 1)) === -1) {\r
+    start -= 1;\r
+    if (this.position - start > (maxLength / 2 - 1)) {\r
+      head = ' ... ';\r
+      start += 5;\r
+      break;\r
+    }\r
+  }\r
+\r
+  tail = '';\r
+  end = this.position;\r
+\r
+  while (end < this.buffer.length && '\x00\r\n\x85\u2028\u2029'.indexOf(this.buffer.charAt(end)) === -1) {\r
+    end += 1;\r
+    if (end - this.position > (maxLength / 2 - 1)) {\r
+      tail = ' ... ';\r
+      end -= 5;\r
+      break;\r
+    }\r
+  }\r
+\r
+  snippet = this.buffer.slice(start, end);\r
+\r
+  return common.repeat(' ', indent) + head + snippet + tail + '\n' +\r
+         common.repeat(' ', indent + this.position - start + head.length) + '^';\r
+};\r
+\r
+\r
+Mark.prototype.toString = function toString(compact) {\r
+  var snippet, where = '';\r
+\r
+  if (this.name) {\r
+    where += 'in "' + this.name + '" ';\r
+  }\r
+\r
+  where += 'at line ' + (this.line + 1) + ', column ' + (this.column + 1);\r
+\r
+  if (!compact) {\r
+    snippet = this.getSnippet();\r
+\r
+    if (snippet) {\r
+      where += ':\n' + snippet;\r
+    }\r
+  }\r
+\r
+  return where;\r
+};\r
+\r
+\r
+module.exports = Mark;\r
+\r
+},{"./common":23}],28:[function(require,module,exports){\r
+'use strict';\r
+\r
+/*eslint-disable max-len*/\r
+\r
+var common        = require('./common');\r
+var YAMLException = require('./exception');\r
+var Type          = require('./type');\r
+\r
+\r
+function compileList(schema, name, result) {\r
+  var exclude = [];\r
+\r
+  schema.include.forEach(function (includedSchema) {\r
+    result = compileList(includedSchema, name, result);\r
+  });\r
+\r
+  schema[name].forEach(function (currentType) {\r
+    result.forEach(function (previousType, previousIndex) {\r
+      if (previousType.tag === currentType.tag) {\r
+        exclude.push(previousIndex);\r
+      }\r
+    });\r
+\r
+    result.push(currentType);\r
+  });\r
+\r
+  return result.filter(function (type, index) {\r
+    return exclude.indexOf(index) === -1;\r
+  });\r
+}\r
+\r
+\r
+function compileMap(/* lists... */) {\r
+  var result = {}, index, length;\r
+\r
+  function collectType(type) {\r
+    result[type.tag] = type;\r
+  }\r
+\r
+  for (index = 0, length = arguments.length; index < length; index += 1) {\r
+    arguments[index].forEach(collectType);\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+\r
+function Schema(definition) {\r
+  this.include  = definition.include  || [];\r
+  this.implicit = definition.implicit || [];\r
+  this.explicit = definition.explicit || [];\r
+\r
+  this.implicit.forEach(function (type) {\r
+    if (type.loadKind && type.loadKind !== 'scalar') {\r
+      throw new YAMLException('There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.');\r
+    }\r
+  });\r
+\r
+  this.compiledImplicit = compileList(this, 'implicit', []);\r
+  this.compiledExplicit = compileList(this, 'explicit', []);\r
+  this.compiledTypeMap  = compileMap(this.compiledImplicit, this.compiledExplicit);\r
+}\r
+\r
+\r
+Schema.DEFAULT = null;\r
+\r
+\r
+Schema.create = function createSchema() {\r
+  var schemas, types;\r
+\r
+  switch (arguments.length) {\r
+    case 1:\r
+      schemas = Schema.DEFAULT;\r
+      types = arguments[0];\r
+      break;\r
+\r
+    case 2:\r
+      schemas = arguments[0];\r
+      types = arguments[1];\r
+      break;\r
+\r
+    default:\r
+      throw new YAMLException('Wrong number of arguments for Schema.create function');\r
+  }\r
+\r
+  schemas = common.toArray(schemas);\r
+  types = common.toArray(types);\r
+\r
+  if (!schemas.every(function (schema) { return schema instanceof Schema; })) {\r
+    throw new YAMLException('Specified list of super schemas (or a single Schema object) contains a non-Schema object.');\r
+  }\r
+\r
+  if (!types.every(function (type) { return type instanceof Type; })) {\r
+    throw new YAMLException('Specified list of YAML types (or a single Type object) contains a non-Type object.');\r
+  }\r
+\r
+  return new Schema({\r
+    include: schemas,\r
+    explicit: types\r
+  });\r
+};\r
+\r
+\r
+module.exports = Schema;\r
+\r
+},{"./common":23,"./exception":25,"./type":34}],29:[function(require,module,exports){\r
+// Standard YAML's Core schema.\r
+// http://www.yaml.org/spec/1.2/spec.html#id2804923\r
+//\r
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\r
+// So, Core schema has no distinctions from JSON schema is JS-YAML.\r
+\r
+\r
+'use strict';\r
+\r
+\r
+var Schema = require('../schema');\r
+\r
+\r
+module.exports = new Schema({\r
+  include: [\r
+    require('./json')\r
+  ]\r
+});\r
+\r
+},{"../schema":28,"./json":33}],30:[function(require,module,exports){\r
+// JS-YAML's default schema for `load` function.\r
+// It is not described in the YAML specification.\r
+//\r
+// This schema is based on JS-YAML's default safe schema and includes\r
+// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.\r
+//\r
+// Also this schema is used as default base schema at `Schema.create` function.\r
+\r
+\r
+'use strict';\r
+\r
+\r
+var Schema = require('../schema');\r
+\r
+\r
+module.exports = Schema.DEFAULT = new Schema({\r
+  include: [\r
+    require('./default_safe')\r
+  ],\r
+  explicit: [\r
+    require('../type/js/undefined'),\r
+    require('../type/js/regexp'),\r
+    require('../type/js/function')\r
+  ]\r
+});\r
+\r
+},{"../schema":28,"../type/js/function":39,"../type/js/regexp":40,"../type/js/undefined":41,"./default_safe":31}],31:[function(require,module,exports){\r
+// JS-YAML's default schema for `safeLoad` function.\r
+// It is not described in the YAML specification.\r
+//\r
+// This schema is based on standard YAML's Core schema and includes most of\r
+// extra types described at YAML tag repository. (http://yaml.org/type/)\r
+\r
+\r
+'use strict';\r
+\r
+\r
+var Schema = require('../schema');\r
+\r
+\r
+module.exports = new Schema({\r
+  include: [\r
+    require('./core')\r
+  ],\r
+  implicit: [\r
+    require('../type/timestamp'),\r
+    require('../type/merge')\r
+  ],\r
+  explicit: [\r
+    require('../type/binary'),\r
+    require('../type/omap'),\r
+    require('../type/pairs'),\r
+    require('../type/set')\r
+  ]\r
+});\r
+\r
+},{"../schema":28,"../type/binary":35,"../type/merge":43,"../type/omap":45,"../type/pairs":46,"../type/set":48,"../type/timestamp":50,"./core":29}],32:[function(require,module,exports){\r
+// Standard YAML's Failsafe schema.\r
+// http://www.yaml.org/spec/1.2/spec.html#id2802346\r
+\r
+\r
+'use strict';\r
+\r
+\r
+var Schema = require('../schema');\r
+\r
+\r
+module.exports = new Schema({\r
+  explicit: [\r
+    require('../type/str'),\r
+    require('../type/seq'),\r
+    require('../type/map')\r
+  ]\r
+});\r
+\r
+},{"../schema":28,"../type/map":42,"../type/seq":47,"../type/str":49}],33:[function(require,module,exports){\r
+// Standard YAML's JSON schema.\r
+// http://www.yaml.org/spec/1.2/spec.html#id2803231\r
+//\r
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.\r
+// So, this schema is not such strict as defined in the YAML specification.\r
+// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.\r
+\r
+\r
+'use strict';\r
+\r
+\r
+var Schema = require('../schema');\r
+\r
+\r
+module.exports = new Schema({\r
+  include: [\r
+    require('./failsafe')\r
+  ],\r
+  implicit: [\r
+    require('../type/null'),\r
+    require('../type/bool'),\r
+    require('../type/int'),\r
+    require('../type/float')\r
+  ]\r
+});\r
+\r
+},{"../schema":28,"../type/bool":36,"../type/float":37,"../type/int":38,"../type/null":44,"./failsafe":32}],34:[function(require,module,exports){\r
+'use strict';\r
+\r
+var YAMLException = require('./exception');\r
+\r
+var TYPE_CONSTRUCTOR_OPTIONS = [\r
+  'kind',\r
+  'resolve',\r
+  'construct',\r
+  'instanceOf',\r
+  'predicate',\r
+  'represent',\r
+  'defaultStyle',\r
+  'styleAliases'\r
+];\r
+\r
+var YAML_NODE_KINDS = [\r
+  'scalar',\r
+  'sequence',\r
+  'mapping'\r
+];\r
+\r
+function compileStyleAliases(map) {\r
+  var result = {};\r
+\r
+  if (map !== null) {\r
+    Object.keys(map).forEach(function (style) {\r
+      map[style].forEach(function (alias) {\r
+        result[String(alias)] = style;\r
+      });\r
+    });\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+function Type(tag, options) {\r
+  options = options || {};\r
+\r
+  Object.keys(options).forEach(function (name) {\r
+    if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {\r
+      throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');\r
+    }\r
+  });\r
+\r
+  // TODO: Add tag format check.\r
+  this.tag          = tag;\r
+  this.kind         = options['kind']         || null;\r
+  this.resolve      = options['resolve']      || function () { return true; };\r
+  this.construct    = options['construct']    || function (data) { return data; };\r
+  this.instanceOf   = options['instanceOf']   || null;\r
+  this.predicate    = options['predicate']    || null;\r
+  this.represent    = options['represent']    || null;\r
+  this.defaultStyle = options['defaultStyle'] || null;\r
+  this.styleAliases = compileStyleAliases(options['styleAliases'] || null);\r
+\r
+  if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {\r
+    throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');\r
+  }\r
+}\r
+\r
+module.exports = Type;\r
+\r
+},{"./exception":25}],35:[function(require,module,exports){\r
+'use strict';\r
+\r
+/*eslint-disable no-bitwise*/\r
+\r
+// A trick for browserified version.\r
+// Since we make browserifier to ignore `buffer` module, NodeBuffer will be undefined\r
+var NodeBuffer = require('buffer').Buffer;\r
+var Type       = require('../type');\r
+\r
+\r
+// [ 64, 65, 66 ] -> [ padding, CR, LF ]\r
+var BASE64_MAP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r';\r
+\r
+\r
+function resolveYamlBinary(data) {\r
+  if (data === null) return false;\r
+\r
+  var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;\r
+\r
+  // Convert one by one.\r
+  for (idx = 0; idx < max; idx++) {\r
+    code = map.indexOf(data.charAt(idx));\r
+\r
+    // Skip CR/LF\r
+    if (code > 64) continue;\r
+\r
+    // Fail on illegal characters\r
+    if (code < 0) return false;\r
+\r
+    bitlen += 6;\r
+  }\r
+\r
+  // If there are any bits left, source was corrupted\r
+  return (bitlen % 8) === 0;\r
+}\r
+\r
+function constructYamlBinary(data) {\r
+  var idx, tailbits,\r
+      input = data.replace(/[\r\n=]/g, ''), // remove CR/LF & padding to simplify scan\r
+      max = input.length,\r
+      map = BASE64_MAP,\r
+      bits = 0,\r
+      result = [];\r
+\r
+  // Collect by 6*4 bits (3 bytes)\r
+\r
+  for (idx = 0; idx < max; idx++) {\r
+    if ((idx % 4 === 0) && idx) {\r
+      result.push((bits >> 16) & 0xFF);\r
+      result.push((bits >> 8) & 0xFF);\r
+      result.push(bits & 0xFF);\r
+    }\r
+\r
+    bits = (bits << 6) | map.indexOf(input.charAt(idx));\r
+  }\r
+\r
+  // Dump tail\r
+\r
+  tailbits = (max % 4) * 6;\r
+\r
+  if (tailbits === 0) {\r
+    result.push((bits >> 16) & 0xFF);\r
+    result.push((bits >> 8) & 0xFF);\r
+    result.push(bits & 0xFF);\r
+  } else if (tailbits === 18) {\r
+    result.push((bits >> 10) & 0xFF);\r
+    result.push((bits >> 2) & 0xFF);\r
+  } else if (tailbits === 12) {\r
+    result.push((bits >> 4) & 0xFF);\r
+  }\r
+\r
+  // Wrap into Buffer for NodeJS and leave Array for browser\r
+  if (NodeBuffer) return new NodeBuffer(result);\r
+\r
+  return result;\r
+}\r
+\r
+function representYamlBinary(object /*, style*/) {\r
+  var result = '', bits = 0, idx, tail,\r
+      max = object.length,\r
+      map = BASE64_MAP;\r
+\r
+  // Convert every three bytes to 4 ASCII characters.\r
+\r
+  for (idx = 0; idx < max; idx++) {\r
+    if ((idx % 3 === 0) && idx) {\r
+      result += map[(bits >> 18) & 0x3F];\r
+      result += map[(bits >> 12) & 0x3F];\r
+      result += map[(bits >> 6) & 0x3F];\r
+      result += map[bits & 0x3F];\r
+    }\r
+\r
+    bits = (bits << 8) + object[idx];\r
+  }\r
+\r
+  // Dump tail\r
+\r
+  tail = max % 3;\r
+\r
+  if (tail === 0) {\r
+    result += map[(bits >> 18) & 0x3F];\r
+    result += map[(bits >> 12) & 0x3F];\r
+    result += map[(bits >> 6) & 0x3F];\r
+    result += map[bits & 0x3F];\r
+  } else if (tail === 2) {\r
+    result += map[(bits >> 10) & 0x3F];\r
+    result += map[(bits >> 4) & 0x3F];\r
+    result += map[(bits << 2) & 0x3F];\r
+    result += map[64];\r
+  } else if (tail === 1) {\r
+    result += map[(bits >> 2) & 0x3F];\r
+    result += map[(bits << 4) & 0x3F];\r
+    result += map[64];\r
+    result += map[64];\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+function isBinary(object) {\r
+  return NodeBuffer && NodeBuffer.isBuffer(object);\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:binary', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlBinary,\r
+  construct: constructYamlBinary,\r
+  predicate: isBinary,\r
+  represent: representYamlBinary\r
+});\r
+\r
+},{"../type":34,"buffer":12}],36:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+function resolveYamlBoolean(data) {\r
+  if (data === null) return false;\r
+\r
+  var max = data.length;\r
+\r
+  return (max === 4 && (data === 'true' || data === 'True' || data === 'TRUE')) ||\r
+         (max === 5 && (data === 'false' || data === 'False' || data === 'FALSE'));\r
+}\r
+\r
+function constructYamlBoolean(data) {\r
+  return data === 'true' ||\r
+         data === 'True' ||\r
+         data === 'TRUE';\r
+}\r
+\r
+function isBoolean(object) {\r
+  return Object.prototype.toString.call(object) === '[object Boolean]';\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:bool', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlBoolean,\r
+  construct: constructYamlBoolean,\r
+  predicate: isBoolean,\r
+  represent: {\r
+    lowercase: function (object) { return object ? 'true' : 'false'; },\r
+    uppercase: function (object) { return object ? 'TRUE' : 'FALSE'; },\r
+    camelcase: function (object) { return object ? 'True' : 'False'; }\r
+  },\r
+  defaultStyle: 'lowercase'\r
+});\r
+\r
+},{"../type":34}],37:[function(require,module,exports){\r
+'use strict';\r
+\r
+var common = require('../common');\r
+var Type   = require('../type');\r
+\r
+var YAML_FLOAT_PATTERN = new RegExp(\r
+  '^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?' +\r
+  '|\\.[0-9_]+(?:[eE][-+][0-9]+)?' +\r
+  '|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*' +\r
+  '|[-+]?\\.(?:inf|Inf|INF)' +\r
+  '|\\.(?:nan|NaN|NAN))$');\r
+\r
+function resolveYamlFloat(data) {\r
+  if (data === null) return false;\r
+\r
+  if (!YAML_FLOAT_PATTERN.test(data)) return false;\r
+\r
+  return true;\r
+}\r
+\r
+function constructYamlFloat(data) {\r
+  var value, sign, base, digits;\r
+\r
+  value  = data.replace(/_/g, '').toLowerCase();\r
+  sign   = value[0] === '-' ? -1 : 1;\r
+  digits = [];\r
+\r
+  if ('+-'.indexOf(value[0]) >= 0) {\r
+    value = value.slice(1);\r
+  }\r
+\r
+  if (value === '.inf') {\r
+    return (sign === 1) ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;\r
+\r
+  } else if (value === '.nan') {\r
+    return NaN;\r
+\r
+  } else if (value.indexOf(':') >= 0) {\r
+    value.split(':').forEach(function (v) {\r
+      digits.unshift(parseFloat(v, 10));\r
+    });\r
+\r
+    value = 0.0;\r
+    base = 1;\r
+\r
+    digits.forEach(function (d) {\r
+      value += d * base;\r
+      base *= 60;\r
+    });\r
+\r
+    return sign * value;\r
+\r
+  }\r
+  return sign * parseFloat(value, 10);\r
+}\r
+\r
+\r
+var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;\r
+\r
+function representYamlFloat(object, style) {\r
+  var res;\r
+\r
+  if (isNaN(object)) {\r
+    switch (style) {\r
+      case 'lowercase': return '.nan';\r
+      case 'uppercase': return '.NAN';\r
+      case 'camelcase': return '.NaN';\r
+    }\r
+  } else if (Number.POSITIVE_INFINITY === object) {\r
+    switch (style) {\r
+      case 'lowercase': return '.inf';\r
+      case 'uppercase': return '.INF';\r
+      case 'camelcase': return '.Inf';\r
+    }\r
+  } else if (Number.NEGATIVE_INFINITY === object) {\r
+    switch (style) {\r
+      case 'lowercase': return '-.inf';\r
+      case 'uppercase': return '-.INF';\r
+      case 'camelcase': return '-.Inf';\r
+    }\r
+  } else if (common.isNegativeZero(object)) {\r
+    return '-0.0';\r
+  }\r
+\r
+  res = object.toString(10);\r
+\r
+  // JS stringifier can build scientific format without dots: 5e-100,\r
+  // while YAML requres dot: 5.e-100. Fix it with simple hack\r
+\r
+  return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace('e', '.e') : res;\r
+}\r
+\r
+function isFloat(object) {\r
+  return (Object.prototype.toString.call(object) === '[object Number]') &&\r
+         (object % 1 !== 0 || common.isNegativeZero(object));\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:float', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlFloat,\r
+  construct: constructYamlFloat,\r
+  predicate: isFloat,\r
+  represent: representYamlFloat,\r
+  defaultStyle: 'lowercase'\r
+});\r
+\r
+},{"../common":23,"../type":34}],38:[function(require,module,exports){\r
+'use strict';\r
+\r
+var common = require('../common');\r
+var Type   = require('../type');\r
+\r
+function isHexCode(c) {\r
+  return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */)) ||\r
+         ((0x41/* A */ <= c) && (c <= 0x46/* F */)) ||\r
+         ((0x61/* a */ <= c) && (c <= 0x66/* f */));\r
+}\r
+\r
+function isOctCode(c) {\r
+  return ((0x30/* 0 */ <= c) && (c <= 0x37/* 7 */));\r
+}\r
+\r
+function isDecCode(c) {\r
+  return ((0x30/* 0 */ <= c) && (c <= 0x39/* 9 */));\r
+}\r
+\r
+function resolveYamlInteger(data) {\r
+  if (data === null) return false;\r
+\r
+  var max = data.length,\r
+      index = 0,\r
+      hasDigits = false,\r
+      ch;\r
+\r
+  if (!max) return false;\r
+\r
+  ch = data[index];\r
+\r
+  // sign\r
+  if (ch === '-' || ch === '+') {\r
+    ch = data[++index];\r
+  }\r
+\r
+  if (ch === '0') {\r
+    // 0\r
+    if (index + 1 === max) return true;\r
+    ch = data[++index];\r
+\r
+    // base 2, base 8, base 16\r
+\r
+    if (ch === 'b') {\r
+      // base 2\r
+      index++;\r
+\r
+      for (; index < max; index++) {\r
+        ch = data[index];\r
+        if (ch === '_') continue;\r
+        if (ch !== '0' && ch !== '1') return false;\r
+        hasDigits = true;\r
+      }\r
+      return hasDigits;\r
+    }\r
+\r
+\r
+    if (ch === 'x') {\r
+      // base 16\r
+      index++;\r
+\r
+      for (; index < max; index++) {\r
+        ch = data[index];\r
+        if (ch === '_') continue;\r
+        if (!isHexCode(data.charCodeAt(index))) return false;\r
+        hasDigits = true;\r
+      }\r
+      return hasDigits;\r
+    }\r
+\r
+    // base 8\r
+    for (; index < max; index++) {\r
+      ch = data[index];\r
+      if (ch === '_') continue;\r
+      if (!isOctCode(data.charCodeAt(index))) return false;\r
+      hasDigits = true;\r
+    }\r
+    return hasDigits;\r
+  }\r
+\r
+  // base 10 (except 0) or base 60\r
+\r
+  for (; index < max; index++) {\r
+    ch = data[index];\r
+    if (ch === '_') continue;\r
+    if (ch === ':') break;\r
+    if (!isDecCode(data.charCodeAt(index))) {\r
+      return false;\r
+    }\r
+    hasDigits = true;\r
+  }\r
+\r
+  if (!hasDigits) return false;\r
+\r
+  // if !base60 - done;\r
+  if (ch !== ':') return true;\r
+\r
+  // base60 almost not used, no needs to optimize\r
+  return /^(:[0-5]?[0-9])+$/.test(data.slice(index));\r
+}\r
+\r
+function constructYamlInteger(data) {\r
+  var value = data, sign = 1, ch, base, digits = [];\r
+\r
+  if (value.indexOf('_') !== -1) {\r
+    value = value.replace(/_/g, '');\r
+  }\r
+\r
+  ch = value[0];\r
+\r
+  if (ch === '-' || ch === '+') {\r
+    if (ch === '-') sign = -1;\r
+    value = value.slice(1);\r
+    ch = value[0];\r
+  }\r
+\r
+  if (value === '0') return 0;\r
+\r
+  if (ch === '0') {\r
+    if (value[1] === 'b') return sign * parseInt(value.slice(2), 2);\r
+    if (value[1] === 'x') return sign * parseInt(value, 16);\r
+    return sign * parseInt(value, 8);\r
+  }\r
+\r
+  if (value.indexOf(':') !== -1) {\r
+    value.split(':').forEach(function (v) {\r
+      digits.unshift(parseInt(v, 10));\r
+    });\r
+\r
+    value = 0;\r
+    base = 1;\r
+\r
+    digits.forEach(function (d) {\r
+      value += (d * base);\r
+      base *= 60;\r
+    });\r
+\r
+    return sign * value;\r
+\r
+  }\r
+\r
+  return sign * parseInt(value, 10);\r
+}\r
+\r
+function isInteger(object) {\r
+  return (Object.prototype.toString.call(object)) === '[object Number]' &&\r
+         (object % 1 === 0 && !common.isNegativeZero(object));\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:int', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlInteger,\r
+  construct: constructYamlInteger,\r
+  predicate: isInteger,\r
+  represent: {\r
+    binary:      function (object) { return '0b' + object.toString(2); },\r
+    octal:       function (object) { return '0'  + object.toString(8); },\r
+    decimal:     function (object) { return        object.toString(10); },\r
+    hexadecimal: function (object) { return '0x' + object.toString(16).toUpperCase(); }\r
+  },\r
+  defaultStyle: 'decimal',\r
+  styleAliases: {\r
+    binary:      [ 2,  'bin' ],\r
+    octal:       [ 8,  'oct' ],\r
+    decimal:     [ 10, 'dec' ],\r
+    hexadecimal: [ 16, 'hex' ]\r
+  }\r
+});\r
+\r
+},{"../common":23,"../type":34}],39:[function(require,module,exports){\r
+'use strict';\r
+\r
+var esprima;\r
+\r
+// Browserified version does not have esprima\r
+//\r
+// 1. For node.js just require module as deps\r
+// 2. For browser try to require mudule via external AMD system.\r
+//    If not found - try to fallback to window.esprima. If not\r
+//    found too - then fail to parse.\r
+//\r
+try {\r
+  // workaround to exclude package from browserify list.\r
+  var _require = require;\r
+  esprima = _require('esprima');\r
+} catch (_) {\r
+  /*global window */\r
+  if (typeof window !== 'undefined') esprima = window.esprima;\r
+}\r
+\r
+var Type = require('../../type');\r
+\r
+function resolveJavascriptFunction(data) {\r
+  if (data === null) return false;\r
+\r
+  try {\r
+    var source = '(' + data + ')',\r
+        ast    = esprima.parse(source, { range: true });\r
+\r
+    if (ast.type                    !== 'Program'             ||\r
+        ast.body.length             !== 1                     ||\r
+        ast.body[0].type            !== 'ExpressionStatement' ||\r
+        ast.body[0].expression.type !== 'FunctionExpression') {\r
+      return false;\r
+    }\r
+\r
+    return true;\r
+  } catch (err) {\r
+    return false;\r
+  }\r
+}\r
+\r
+function constructJavascriptFunction(data) {\r
+  /*jslint evil:true*/\r
+\r
+  var source = '(' + data + ')',\r
+      ast    = esprima.parse(source, { range: true }),\r
+      params = [],\r
+      body;\r
+\r
+  if (ast.type                    !== 'Program'             ||\r
+      ast.body.length             !== 1                     ||\r
+      ast.body[0].type            !== 'ExpressionStatement' ||\r
+      ast.body[0].expression.type !== 'FunctionExpression') {\r
+    throw new Error('Failed to resolve function');\r
+  }\r
+\r
+  ast.body[0].expression.params.forEach(function (param) {\r
+    params.push(param.name);\r
+  });\r
+\r
+  body = ast.body[0].expression.body.range;\r
+\r
+  // Esprima's ranges include the first '{' and the last '}' characters on\r
+  // function expressions. So cut them out.\r
+  /*eslint-disable no-new-func*/\r
+  return new Function(params, source.slice(body[0] + 1, body[1] - 1));\r
+}\r
+\r
+function representJavascriptFunction(object /*, style*/) {\r
+  return object.toString();\r
+}\r
+\r
+function isFunction(object) {\r
+  return Object.prototype.toString.call(object) === '[object Function]';\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:js/function', {\r
+  kind: 'scalar',\r
+  resolve: resolveJavascriptFunction,\r
+  construct: constructJavascriptFunction,\r
+  predicate: isFunction,\r
+  represent: representJavascriptFunction\r
+});\r
+\r
+},{"../../type":34}],40:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../../type');\r
+\r
+function resolveJavascriptRegExp(data) {\r
+  if (data === null) return false;\r
+  if (data.length === 0) return false;\r
+\r
+  var regexp = data,\r
+      tail   = /\/([gim]*)$/.exec(data),\r
+      modifiers = '';\r
+\r
+  // if regexp starts with '/' it can have modifiers and must be properly closed\r
+  // `/foo/gim` - modifiers tail can be maximum 3 chars\r
+  if (regexp[0] === '/') {\r
+    if (tail) modifiers = tail[1];\r
+\r
+    if (modifiers.length > 3) return false;\r
+    // if expression starts with /, is should be properly terminated\r
+    if (regexp[regexp.length - modifiers.length - 1] !== '/') return false;\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function constructJavascriptRegExp(data) {\r
+  var regexp = data,\r
+      tail   = /\/([gim]*)$/.exec(data),\r
+      modifiers = '';\r
+\r
+  // `/foo/gim` - tail can be maximum 4 chars\r
+  if (regexp[0] === '/') {\r
+    if (tail) modifiers = tail[1];\r
+    regexp = regexp.slice(1, regexp.length - modifiers.length - 1);\r
+  }\r
+\r
+  return new RegExp(regexp, modifiers);\r
+}\r
+\r
+function representJavascriptRegExp(object /*, style*/) {\r
+  var result = '/' + object.source + '/';\r
+\r
+  if (object.global) result += 'g';\r
+  if (object.multiline) result += 'm';\r
+  if (object.ignoreCase) result += 'i';\r
+\r
+  return result;\r
+}\r
+\r
+function isRegExp(object) {\r
+  return Object.prototype.toString.call(object) === '[object RegExp]';\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:js/regexp', {\r
+  kind: 'scalar',\r
+  resolve: resolveJavascriptRegExp,\r
+  construct: constructJavascriptRegExp,\r
+  predicate: isRegExp,\r
+  represent: representJavascriptRegExp\r
+});\r
+\r
+},{"../../type":34}],41:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../../type');\r
+\r
+function resolveJavascriptUndefined() {\r
+  return true;\r
+}\r
+\r
+function constructJavascriptUndefined() {\r
+  /*eslint-disable no-undefined*/\r
+  return undefined;\r
+}\r
+\r
+function representJavascriptUndefined() {\r
+  return '';\r
+}\r
+\r
+function isUndefined(object) {\r
+  return typeof object === 'undefined';\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:js/undefined', {\r
+  kind: 'scalar',\r
+  resolve: resolveJavascriptUndefined,\r
+  construct: constructJavascriptUndefined,\r
+  predicate: isUndefined,\r
+  represent: representJavascriptUndefined\r
+});\r
+\r
+},{"../../type":34}],42:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+module.exports = new Type('tag:yaml.org,2002:map', {\r
+  kind: 'mapping',\r
+  construct: function (data) { return data !== null ? data : {}; }\r
+});\r
+\r
+},{"../type":34}],43:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+function resolveYamlMerge(data) {\r
+  return data === '<<' || data === null;\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:merge', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlMerge\r
+});\r
+\r
+},{"../type":34}],44:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+function resolveYamlNull(data) {\r
+  if (data === null) return true;\r
+\r
+  var max = data.length;\r
+\r
+  return (max === 1 && data === '~') ||\r
+         (max === 4 && (data === 'null' || data === 'Null' || data === 'NULL'));\r
+}\r
+\r
+function constructYamlNull() {\r
+  return null;\r
+}\r
+\r
+function isNull(object) {\r
+  return object === null;\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:null', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlNull,\r
+  construct: constructYamlNull,\r
+  predicate: isNull,\r
+  represent: {\r
+    canonical: function () { return '~';    },\r
+    lowercase: function () { return 'null'; },\r
+    uppercase: function () { return 'NULL'; },\r
+    camelcase: function () { return 'Null'; }\r
+  },\r
+  defaultStyle: 'lowercase'\r
+});\r
+\r
+},{"../type":34}],45:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+var _hasOwnProperty = Object.prototype.hasOwnProperty;\r
+var _toString       = Object.prototype.toString;\r
+\r
+function resolveYamlOmap(data) {\r
+  if (data === null) return true;\r
+\r
+  var objectKeys = [], index, length, pair, pairKey, pairHasKey,\r
+      object = data;\r
+\r
+  for (index = 0, length = object.length; index < length; index += 1) {\r
+    pair = object[index];\r
+    pairHasKey = false;\r
+\r
+    if (_toString.call(pair) !== '[object Object]') return false;\r
+\r
+    for (pairKey in pair) {\r
+      if (_hasOwnProperty.call(pair, pairKey)) {\r
+        if (!pairHasKey) pairHasKey = true;\r
+        else return false;\r
+      }\r
+    }\r
+\r
+    if (!pairHasKey) return false;\r
+\r
+    if (objectKeys.indexOf(pairKey) === -1) objectKeys.push(pairKey);\r
+    else return false;\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function constructYamlOmap(data) {\r
+  return data !== null ? data : [];\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:omap', {\r
+  kind: 'sequence',\r
+  resolve: resolveYamlOmap,\r
+  construct: constructYamlOmap\r
+});\r
+\r
+},{"../type":34}],46:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+var _toString = Object.prototype.toString;\r
+\r
+function resolveYamlPairs(data) {\r
+  if (data === null) return true;\r
+\r
+  var index, length, pair, keys, result,\r
+      object = data;\r
+\r
+  result = new Array(object.length);\r
+\r
+  for (index = 0, length = object.length; index < length; index += 1) {\r
+    pair = object[index];\r
+\r
+    if (_toString.call(pair) !== '[object Object]') return false;\r
+\r
+    keys = Object.keys(pair);\r
+\r
+    if (keys.length !== 1) return false;\r
+\r
+    result[index] = [ keys[0], pair[keys[0]] ];\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function constructYamlPairs(data) {\r
+  if (data === null) return [];\r
+\r
+  var index, length, pair, keys, result,\r
+      object = data;\r
+\r
+  result = new Array(object.length);\r
+\r
+  for (index = 0, length = object.length; index < length; index += 1) {\r
+    pair = object[index];\r
+\r
+    keys = Object.keys(pair);\r
+\r
+    result[index] = [ keys[0], pair[keys[0]] ];\r
+  }\r
+\r
+  return result;\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:pairs', {\r
+  kind: 'sequence',\r
+  resolve: resolveYamlPairs,\r
+  construct: constructYamlPairs\r
+});\r
+\r
+},{"../type":34}],47:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+module.exports = new Type('tag:yaml.org,2002:seq', {\r
+  kind: 'sequence',\r
+  construct: function (data) { return data !== null ? data : []; }\r
+});\r
+\r
+},{"../type":34}],48:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+var _hasOwnProperty = Object.prototype.hasOwnProperty;\r
+\r
+function resolveYamlSet(data) {\r
+  if (data === null) return true;\r
+\r
+  var key, object = data;\r
+\r
+  for (key in object) {\r
+    if (_hasOwnProperty.call(object, key)) {\r
+      if (object[key] !== null) return false;\r
+    }\r
+  }\r
+\r
+  return true;\r
+}\r
+\r
+function constructYamlSet(data) {\r
+  return data !== null ? data : {};\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:set', {\r
+  kind: 'mapping',\r
+  resolve: resolveYamlSet,\r
+  construct: constructYamlSet\r
+});\r
+\r
+},{"../type":34}],49:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+module.exports = new Type('tag:yaml.org,2002:str', {\r
+  kind: 'scalar',\r
+  construct: function (data) { return data !== null ? data : ''; }\r
+});\r
+\r
+},{"../type":34}],50:[function(require,module,exports){\r
+'use strict';\r
+\r
+var Type = require('../type');\r
+\r
+var YAML_TIMESTAMP_REGEXP = new RegExp(\r
+  '^([0-9][0-9][0-9][0-9])'          + // [1] year\r
+  '-([0-9][0-9]?)'                   + // [2] month\r
+  '-([0-9][0-9]?)'                   + // [3] day\r
+  '(?:(?:[Tt]|[ \\t]+)'              + // ...\r
+  '([0-9][0-9]?)'                    + // [4] hour\r
+  ':([0-9][0-9])'                    + // [5] minute\r
+  ':([0-9][0-9])'                    + // [6] second\r
+  '(?:\\.([0-9]*))?'                 + // [7] fraction\r
+  '(?:[ \\t]*(Z|([-+])([0-9][0-9]?)' + // [8] tz [9] tz_sign [10] tz_hour\r
+  '(?::([0-9][0-9]))?))?)?$');         // [11] tz_minute\r
+\r
+function resolveYamlTimestamp(data) {\r
+  if (data === null) return false;\r
+  if (YAML_TIMESTAMP_REGEXP.exec(data) === null) return false;\r
+  return true;\r
+}\r
+\r
+function constructYamlTimestamp(data) {\r
+  var match, year, month, day, hour, minute, second, fraction = 0,\r
+      delta = null, tz_hour, tz_minute, date;\r
+\r
+  match = YAML_TIMESTAMP_REGEXP.exec(data);\r
+\r
+  if (match === null) throw new Error('Date resolve error');\r
+\r
+  // match: [1] year [2] month [3] day\r
+\r
+  year = +(match[1]);\r
+  month = +(match[2]) - 1; // JS month starts with 0\r
+  day = +(match[3]);\r
+\r
+  if (!match[4]) { // no hour\r
+    return new Date(Date.UTC(year, month, day));\r
+  }\r
+\r
+  // match: [4] hour [5] minute [6] second [7] fraction\r
+\r
+  hour = +(match[4]);\r
+  minute = +(match[5]);\r
+  second = +(match[6]);\r
+\r
+  if (match[7]) {\r
+    fraction = match[7].slice(0, 3);\r
+    while (fraction.length < 3) { // milli-seconds\r
+      fraction += '0';\r
+    }\r
+    fraction = +fraction;\r
+  }\r
+\r
+  // match: [8] tz [9] tz_sign [10] tz_hour [11] tz_minute\r
+\r
+  if (match[9]) {\r
+    tz_hour = +(match[10]);\r
+    tz_minute = +(match[11] || 0);\r
+    delta = (tz_hour * 60 + tz_minute) * 60000; // delta in mili-seconds\r
+    if (match[9] === '-') delta = -delta;\r
+  }\r
+\r
+  date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));\r
+\r
+  if (delta) date.setTime(date.getTime() - delta);\r
+\r
+  return date;\r
+}\r
+\r
+function representYamlTimestamp(object /*, style*/) {\r
+  return object.toISOString();\r
+}\r
+\r
+module.exports = new Type('tag:yaml.org,2002:timestamp', {\r
+  kind: 'scalar',\r
+  resolve: resolveYamlTimestamp,\r
+  construct: constructYamlTimestamp,\r
+  instanceOf: Date,\r
+  represent: representYamlTimestamp\r
+});\r
+\r
+},{"../type":34}],51:[function(require,module,exports){\r
+var baseIndexOf = require('../internal/baseIndexOf'),\r
+    binaryIndex = require('../internal/binaryIndex');\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Gets the index at which the first occurrence of `value` is found in `array`\r
+ * using [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\r
+ * for equality comparisons. If `fromIndex` is negative, it's used as the offset\r
+ * from the end of `array`. If `array` is sorted providing `true` for `fromIndex`\r
+ * performs a faster binary search.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Array\r
+ * @param {Array} array The array to search.\r
+ * @param {*} value The value to search for.\r
+ * @param {boolean|number} [fromIndex=0] The index to search from or `true`\r
+ *  to perform a binary search on a sorted array.\r
+ * @returns {number} Returns the index of the matched value, else `-1`.\r
+ * @example\r
+ *\r
+ * _.indexOf([1, 2, 1, 2], 2);\r
+ * // => 1\r
+ *\r
+ * // using `fromIndex`\r
+ * _.indexOf([1, 2, 1, 2], 2, 2);\r
+ * // => 3\r
+ *\r
+ * // performing a binary search\r
+ * _.indexOf([1, 1, 2, 2], 2, true);\r
+ * // => 2\r
+ */\r
+function indexOf(array, value, fromIndex) {\r
+  var length = array ? array.length : 0;\r
+  if (!length) {\r
+    return -1;\r
+  }\r
+  if (typeof fromIndex == 'number') {\r
+    fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;\r
+  } else if (fromIndex) {\r
+    var index = binaryIndex(array, value);\r
+    if (index < length &&\r
+        (value === value ? (value === array[index]) : (array[index] !== array[index]))) {\r
+      return index;\r
+    }\r
+    return -1;\r
+  }\r
+  return baseIndexOf(array, value, fromIndex || 0);\r
+}\r
+\r
+module.exports = indexOf;\r
+\r
+},{"../internal/baseIndexOf":80,"../internal/binaryIndex":94}],52:[function(require,module,exports){\r
+/**\r
+ * Gets the last element of `array`.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Array\r
+ * @param {Array} array The array to query.\r
+ * @returns {*} Returns the last element of `array`.\r
+ * @example\r
+ *\r
+ * _.last([1, 2, 3]);\r
+ * // => 3\r
+ */\r
+function last(array) {\r
+  var length = array ? array.length : 0;\r
+  return length ? array[length - 1] : undefined;\r
+}\r
+\r
+module.exports = last;\r
+\r
+},{}],53:[function(require,module,exports){\r
+var LazyWrapper = require('../internal/LazyWrapper'),\r
+    LodashWrapper = require('../internal/LodashWrapper'),\r
+    baseLodash = require('../internal/baseLodash'),\r
+    isArray = require('../lang/isArray'),\r
+    isObjectLike = require('../internal/isObjectLike'),\r
+    wrapperClone = require('../internal/wrapperClone');\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * Creates a `lodash` object which wraps `value` to enable implicit chaining.\r
+ * Methods that operate on and return arrays, collections, and functions can\r
+ * be chained together. Methods that retrieve a single value or may return a\r
+ * primitive value will automatically end the chain returning the unwrapped\r
+ * value. Explicit chaining may be enabled using `_.chain`. The execution of\r
+ * chained methods is lazy, that is, execution is deferred until `_#value`\r
+ * is implicitly or explicitly called.\r
+ *\r
+ * Lazy evaluation allows several methods to support shortcut fusion. Shortcut\r
+ * fusion is an optimization strategy which merge iteratee calls; this can help\r
+ * to avoid the creation of intermediate data structures and greatly reduce the\r
+ * number of iteratee executions.\r
+ *\r
+ * Chaining is supported in custom builds as long as the `_#value` method is\r
+ * directly or indirectly included in the build.\r
+ *\r
+ * In addition to lodash methods, wrappers have `Array` and `String` methods.\r
+ *\r
+ * The wrapper `Array` methods are:\r
+ * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`,\r
+ * `splice`, and `unshift`\r
+ *\r
+ * The wrapper `String` methods are:\r
+ * `replace` and `split`\r
+ *\r
+ * The wrapper methods that support shortcut fusion are:\r
+ * `compact`, `drop`, `dropRight`, `dropRightWhile`, `dropWhile`, `filter`,\r
+ * `first`, `initial`, `last`, `map`, `pluck`, `reject`, `rest`, `reverse`,\r
+ * `slice`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, `toArray`,\r
+ * and `where`\r
+ *\r
+ * The chainable wrapper methods are:\r
+ * `after`, `ary`, `assign`, `at`, `before`, `bind`, `bindAll`, `bindKey`,\r
+ * `callback`, `chain`, `chunk`, `commit`, `compact`, `concat`, `constant`,\r
+ * `countBy`, `create`, `curry`, `debounce`, `defaults`, `defaultsDeep`,\r
+ * `defer`, `delay`, `difference`, `drop`, `dropRight`, `dropRightWhile`,\r
+ * `dropWhile`, `fill`, `filter`, `flatten`, `flattenDeep`, `flow`, `flowRight`,\r
+ * `forEach`, `forEachRight`, `forIn`, `forInRight`, `forOwn`, `forOwnRight`,\r
+ * `functions`, `groupBy`, `indexBy`, `initial`, `intersection`, `invert`,\r
+ * `invoke`, `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`,\r
+ * `matchesProperty`, `memoize`, `merge`, `method`, `methodOf`, `mixin`,\r
+ * `modArgs`, `negate`, `omit`, `once`, `pairs`, `partial`, `partialRight`,\r
+ * `partition`, `pick`, `plant`, `pluck`, `property`, `propertyOf`, `pull`,\r
+ * `pullAt`, `push`, `range`, `rearg`, `reject`, `remove`, `rest`, `restParam`,\r
+ * `reverse`, `set`, `shuffle`, `slice`, `sort`, `sortBy`, `sortByAll`,\r
+ * `sortByOrder`, `splice`, `spread`, `take`, `takeRight`, `takeRightWhile`,\r
+ * `takeWhile`, `tap`, `throttle`, `thru`, `times`, `toArray`, `toPlainObject`,\r
+ * `transform`, `union`, `uniq`, `unshift`, `unzip`, `unzipWith`, `values`,\r
+ * `valuesIn`, `where`, `without`, `wrap`, `xor`, `zip`, `zipObject`, `zipWith`\r
+ *\r
+ * The wrapper methods that are **not** chainable by default are:\r
+ * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clone`, `cloneDeep`,\r
+ * `deburr`, `endsWith`, `escape`, `escapeRegExp`, `every`, `find`, `findIndex`,\r
+ * `findKey`, `findLast`, `findLastIndex`, `findLastKey`, `findWhere`, `first`,\r
+ * `floor`, `get`, `gt`, `gte`, `has`, `identity`, `includes`, `indexOf`,\r
+ * `inRange`, `isArguments`, `isArray`, `isBoolean`, `isDate`, `isElement`,\r
+ * `isEmpty`, `isEqual`, `isError`, `isFinite` `isFunction`, `isMatch`,\r
+ * `isNative`, `isNaN`, `isNull`, `isNumber`, `isObject`, `isPlainObject`,\r
+ * `isRegExp`, `isString`, `isUndefined`, `isTypedArray`, `join`, `kebabCase`,\r
+ * `last`, `lastIndexOf`, `lt`, `lte`, `max`, `min`, `noConflict`, `noop`,\r
+ * `now`, `pad`, `padLeft`, `padRight`, `parseInt`, `pop`, `random`, `reduce`,\r
+ * `reduceRight`, `repeat`, `result`, `round`, `runInContext`, `shift`, `size`,\r
+ * `snakeCase`, `some`, `sortedIndex`, `sortedLastIndex`, `startCase`,\r
+ * `startsWith`, `sum`, `template`, `trim`, `trimLeft`, `trimRight`, `trunc`,\r
+ * `unescape`, `uniqueId`, `value`, and `words`\r
+ *\r
+ * The wrapper method `sample` will return a wrapped value when `n` is provided,\r
+ * otherwise an unwrapped value is returned.\r
+ *\r
+ * @name _\r
+ * @constructor\r
+ * @category Chain\r
+ * @param {*} value The value to wrap in a `lodash` instance.\r
+ * @returns {Object} Returns the new `lodash` wrapper instance.\r
+ * @example\r
+ *\r
+ * var wrapped = _([1, 2, 3]);\r
+ *\r
+ * // returns an unwrapped value\r
+ * wrapped.reduce(function(total, n) {\r
+ *   return total + n;\r
+ * });\r
+ * // => 6\r
+ *\r
+ * // returns a wrapped value\r
+ * var squares = wrapped.map(function(n) {\r
+ *   return n * n;\r
+ * });\r
+ *\r
+ * _.isArray(squares);\r
+ * // => false\r
+ *\r
+ * _.isArray(squares.value());\r
+ * // => true\r
+ */\r
+function lodash(value) {\r
+  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {\r
+    if (value instanceof LodashWrapper) {\r
+      return value;\r
+    }\r
+    if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {\r
+      return wrapperClone(value);\r
+    }\r
+  }\r
+  return new LodashWrapper(value);\r
+}\r
+\r
+// Ensure wrappers are instances of `baseLodash`.\r
+lodash.prototype = baseLodash.prototype;\r
+\r
+module.exports = lodash;\r
+\r
+},{"../internal/LazyWrapper":62,"../internal/LodashWrapper":63,"../internal/baseLodash":84,"../internal/isObjectLike":128,"../internal/wrapperClone":139,"../lang/isArray":142}],54:[function(require,module,exports){\r
+module.exports = require('./forEach');\r
+\r
+},{"./forEach":56}],55:[function(require,module,exports){\r
+var baseEach = require('../internal/baseEach'),\r
+    createFind = require('../internal/createFind');\r
+\r
+/**\r
+ * Iterates over elements of `collection`, returning the first element\r
+ * `predicate` returns truthy for. The predicate is bound to `thisArg` and\r
+ * invoked with three arguments: (value, index|key, collection).\r
+ *\r
+ * If a property name is provided for `predicate` the created `_.property`\r
+ * style callback returns the property value of the given element.\r
+ *\r
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`\r
+ * style callback returns `true` for elements that have a matching property\r
+ * value, else `false`.\r
+ *\r
+ * If an object is provided for `predicate` the created `_.matches` style\r
+ * callback returns `true` for elements that have the properties of the given\r
+ * object, else `false`.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @alias detect\r
+ * @category Collection\r
+ * @param {Array|Object|string} collection The collection to search.\r
+ * @param {Function|Object|string} [predicate=_.identity] The function invoked\r
+ *  per iteration.\r
+ * @param {*} [thisArg] The `this` binding of `predicate`.\r
+ * @returns {*} Returns the matched element, else `undefined`.\r
+ * @example\r
+ *\r
+ * var users = [\r
+ *   { 'user': 'barney',  'age': 36, 'active': true },\r
+ *   { 'user': 'fred',    'age': 40, 'active': false },\r
+ *   { 'user': 'pebbles', 'age': 1,  'active': true }\r
+ * ];\r
+ *\r
+ * _.result(_.find(users, function(chr) {\r
+ *   return chr.age < 40;\r
+ * }), 'user');\r
+ * // => 'barney'\r
+ *\r
+ * // using the `_.matches` callback shorthand\r
+ * _.result(_.find(users, { 'age': 1, 'active': true }), 'user');\r
+ * // => 'pebbles'\r
+ *\r
+ * // using the `_.matchesProperty` callback shorthand\r
+ * _.result(_.find(users, 'active', false), 'user');\r
+ * // => 'fred'\r
+ *\r
+ * // using the `_.property` callback shorthand\r
+ * _.result(_.find(users, 'active'), 'user');\r
+ * // => 'barney'\r
+ */\r
+var find = createFind(baseEach);\r
+\r
+module.exports = find;\r
+\r
+},{"../internal/baseEach":73,"../internal/createFind":104}],56:[function(require,module,exports){\r
+var arrayEach = require('../internal/arrayEach'),\r
+    baseEach = require('../internal/baseEach'),\r
+    createForEach = require('../internal/createForEach');\r
+\r
+/**\r
+ * Iterates over elements of `collection` invoking `iteratee` for each element.\r
+ * The `iteratee` is bound to `thisArg` and invoked with three arguments:\r
+ * (value, index|key, collection). Iteratee functions may exit iteration early\r
+ * by explicitly returning `false`.\r
+ *\r
+ * **Note:** As with other "Collections" methods, objects with a "length" property\r
+ * are iterated like arrays. To avoid this behavior `_.forIn` or `_.forOwn`\r
+ * may be used for object iteration.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @alias each\r
+ * @category Collection\r
+ * @param {Array|Object|string} collection The collection to iterate over.\r
+ * @param {Function} [iteratee=_.identity] The function invoked per iteration.\r
+ * @param {*} [thisArg] The `this` binding of `iteratee`.\r
+ * @returns {Array|Object|string} Returns `collection`.\r
+ * @example\r
+ *\r
+ * _([1, 2]).forEach(function(n) {\r
+ *   console.log(n);\r
+ * }).value();\r
+ * // => logs each value from left to right and returns the array\r
+ *\r
+ * _.forEach({ 'a': 1, 'b': 2 }, function(n, key) {\r
+ *   console.log(n, key);\r
+ * });\r
+ * // => logs each value-key pair and returns the object (iteration order is not guaranteed)\r
+ */\r
+var forEach = createForEach(arrayEach, baseEach);\r
+\r
+module.exports = forEach;\r
+\r
+},{"../internal/arrayEach":65,"../internal/baseEach":73,"../internal/createForEach":105}],57:[function(require,module,exports){\r
+var baseIndexOf = require('../internal/baseIndexOf'),\r
+    getLength = require('../internal/getLength'),\r
+    isArray = require('../lang/isArray'),\r
+    isIterateeCall = require('../internal/isIterateeCall'),\r
+    isLength = require('../internal/isLength'),\r
+    isString = require('../lang/isString'),\r
+    values = require('../object/values');\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Checks if `target` is in `collection` using\r
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)\r
+ * for equality comparisons. If `fromIndex` is negative, it's used as the offset\r
+ * from the end of `collection`.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @alias contains, include\r
+ * @category Collection\r
+ * @param {Array|Object|string} collection The collection to search.\r
+ * @param {*} target The value to search for.\r
+ * @param {number} [fromIndex=0] The index to search from.\r
+ * @param- {Object} [guard] Enables use as a callback for functions like `_.reduce`.\r
+ * @returns {boolean} Returns `true` if a matching element is found, else `false`.\r
+ * @example\r
+ *\r
+ * _.includes([1, 2, 3], 1);\r
+ * // => true\r
+ *\r
+ * _.includes([1, 2, 3], 1, 2);\r
+ * // => false\r
+ *\r
+ * _.includes({ 'user': 'fred', 'age': 40 }, 'fred');\r
+ * // => true\r
+ *\r
+ * _.includes('pebbles', 'eb');\r
+ * // => true\r
+ */\r
+function includes(collection, target, fromIndex, guard) {\r
+  var length = collection ? getLength(collection) : 0;\r
+  if (!isLength(length)) {\r
+    collection = values(collection);\r
+    length = collection.length;\r
+  }\r
+  if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {\r
+    fromIndex = 0;\r
+  } else {\r
+    fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);\r
+  }\r
+  return (typeof collection == 'string' || !isArray(collection) && isString(collection))\r
+    ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)\r
+    : (!!length && baseIndexOf(collection, target, fromIndex) > -1);\r
+}\r
+\r
+module.exports = includes;\r
+\r
+},{"../internal/baseIndexOf":80,"../internal/getLength":114,"../internal/isIterateeCall":124,"../internal/isLength":127,"../lang/isArray":142,"../lang/isString":148,"../object/values":154}],58:[function(require,module,exports){\r
+var arrayMap = require('../internal/arrayMap'),\r
+    baseCallback = require('../internal/baseCallback'),\r
+    baseMap = require('../internal/baseMap'),\r
+    isArray = require('../lang/isArray');\r
+\r
+/**\r
+ * Creates an array of values by running each element in `collection` through\r
+ * `iteratee`. The `iteratee` is bound to `thisArg` and invoked with three\r
+ * arguments: (value, index|key, collection).\r
+ *\r
+ * If a property name is provided for `iteratee` the created `_.property`\r
+ * style callback returns the property value of the given element.\r
+ *\r
+ * If a value is also provided for `thisArg` the created `_.matchesProperty`\r
+ * style callback returns `true` for elements that have a matching property\r
+ * value, else `false`.\r
+ *\r
+ * If an object is provided for `iteratee` the created `_.matches` style\r
+ * callback returns `true` for elements that have the properties of the given\r
+ * object, else `false`.\r
+ *\r
+ * Many lodash methods are guarded to work as iteratees for methods like\r
+ * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\r
+ *\r
+ * The guarded methods are:\r
+ * `ary`, `callback`, `chunk`, `clone`, `create`, `curry`, `curryRight`,\r
+ * `drop`, `dropRight`, `every`, `fill`, `flatten`, `invert`, `max`, `min`,\r
+ * `parseInt`, `slice`, `sortBy`, `take`, `takeRight`, `template`, `trim`,\r
+ * `trimLeft`, `trimRight`, `trunc`, `random`, `range`, `sample`, `some`,\r
+ * `sum`, `uniq`, and `words`\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @alias collect\r
+ * @category Collection\r
+ * @param {Array|Object|string} collection The collection to iterate over.\r
+ * @param {Function|Object|string} [iteratee=_.identity] The function invoked\r
+ *  per iteration.\r
+ * @param {*} [thisArg] The `this` binding of `iteratee`.\r
+ * @returns {Array} Returns the new mapped array.\r
+ * @example\r
+ *\r
+ * function timesThree(n) {\r
+ *   return n * 3;\r
+ * }\r
+ *\r
+ * _.map([1, 2], timesThree);\r
+ * // => [3, 6]\r
+ *\r
+ * _.map({ 'a': 1, 'b': 2 }, timesThree);\r
+ * // => [3, 6] (iteration order is not guaranteed)\r
+ *\r
+ * var users = [\r
+ *   { 'user': 'barney' },\r
+ *   { 'user': 'fred' }\r
+ * ];\r
+ *\r
+ * // using the `_.property` callback shorthand\r
+ * _.map(users, 'user');\r
+ * // => ['barney', 'fred']\r
+ */\r
+function map(collection, iteratee, thisArg) {\r
+  var func = isArray(collection) ? arrayMap : baseMap;\r
+  iteratee = baseCallback(iteratee, thisArg, 3);\r
+  return func(collection, iteratee);\r
+}\r
+\r
+module.exports = map;\r
+\r
+},{"../internal/arrayMap":66,"../internal/baseCallback":69,"../internal/baseMap":85,"../lang/isArray":142}],59:[function(require,module,exports){\r
+var getNative = require('../internal/getNative');\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeNow = getNative(Date, 'now');\r
+\r
+/**\r
+ * Gets the number of milliseconds that have elapsed since the Unix epoch\r
+ * (1 January 1970 00:00:00 UTC).\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Date\r
+ * @example\r
+ *\r
+ * _.defer(function(stamp) {\r
+ *   console.log(_.now() - stamp);\r
+ * }, _.now());\r
+ * // => logs the number of milliseconds it took for the deferred function to be invoked\r
+ */\r
+var now = nativeNow || function() {\r
+  return new Date().getTime();\r
+};\r
+\r
+module.exports = now;\r
+\r
+},{"../internal/getNative":116}],60:[function(require,module,exports){\r
+var createWrapper = require('../internal/createWrapper'),\r
+    replaceHolders = require('../internal/replaceHolders'),\r
+    restParam = require('./restParam');\r
+\r
+/** Used to compose bitmasks for wrapper metadata. */\r
+var BIND_FLAG = 1,\r
+    PARTIAL_FLAG = 32;\r
+\r
+/**\r
+ * Creates a function that invokes `func` with the `this` binding of `thisArg`\r
+ * and prepends any additional `_.bind` arguments to those provided to the\r
+ * bound function.\r
+ *\r
+ * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,\r
+ * may be used as a placeholder for partially applied arguments.\r
+ *\r
+ * **Note:** Unlike native `Function#bind` this method does not set the "length"\r
+ * property of bound functions.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Function\r
+ * @param {Function} func The function to bind.\r
+ * @param {*} thisArg The `this` binding of `func`.\r
+ * @param {...*} [partials] The arguments to be partially applied.\r
+ * @returns {Function} Returns the new bound function.\r
+ * @example\r
+ *\r
+ * var greet = function(greeting, punctuation) {\r
+ *   return greeting + ' ' + this.user + punctuation;\r
+ * };\r
+ *\r
+ * var object = { 'user': 'fred' };\r
+ *\r
+ * var bound = _.bind(greet, object, 'hi');\r
+ * bound('!');\r
+ * // => 'hi fred!'\r
+ *\r
+ * // using placeholders\r
+ * var bound = _.bind(greet, object, _, '!');\r
+ * bound('hi');\r
+ * // => 'hi fred!'\r
+ */\r
+var bind = restParam(function(func, thisArg, partials) {\r
+  var bitmask = BIND_FLAG;\r
+  if (partials.length) {\r
+    var holders = replaceHolders(partials, bind.placeholder);\r
+    bitmask |= PARTIAL_FLAG;\r
+  }\r
+  return createWrapper(func, bitmask, thisArg, partials, holders);\r
+});\r
+\r
+// Assign default placeholders.\r
+bind.placeholder = {};\r
+\r
+module.exports = bind;\r
+\r
+},{"../internal/createWrapper":108,"../internal/replaceHolders":134,"./restParam":61}],61:[function(require,module,exports){\r
+/** Used as the `TypeError` message for "Functions" methods. */\r
+var FUNC_ERROR_TEXT = 'Expected a function';\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Creates a function that invokes `func` with the `this` binding of the\r
+ * created function and arguments from `start` and beyond provided as an array.\r
+ *\r
+ * **Note:** This method is based on the [rest parameter](https://developer.mozilla.org/Web/JavaScript/Reference/Functions/rest_parameters).\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Function\r
+ * @param {Function} func The function to apply a rest parameter to.\r
+ * @param {number} [start=func.length-1] The start position of the rest parameter.\r
+ * @returns {Function} Returns the new function.\r
+ * @example\r
+ *\r
+ * var say = _.restParam(function(what, names) {\r
+ *   return what + ' ' + _.initial(names).join(', ') +\r
+ *     (_.size(names) > 1 ? ', & ' : '') + _.last(names);\r
+ * });\r
+ *\r
+ * say('hello', 'fred', 'barney', 'pebbles');\r
+ * // => 'hello fred, barney, & pebbles'\r
+ */\r
+function restParam(func, start) {\r
+  if (typeof func != 'function') {\r
+    throw new TypeError(FUNC_ERROR_TEXT);\r
+  }\r
+  start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);\r
+  return function() {\r
+    var args = arguments,\r
+        index = -1,\r
+        length = nativeMax(args.length - start, 0),\r
+        rest = Array(length);\r
+\r
+    while (++index < length) {\r
+      rest[index] = args[start + index];\r
+    }\r
+    switch (start) {\r
+      case 0: return func.call(this, rest);\r
+      case 1: return func.call(this, args[0], rest);\r
+      case 2: return func.call(this, args[0], args[1], rest);\r
+    }\r
+    var otherArgs = Array(start + 1);\r
+    index = -1;\r
+    while (++index < start) {\r
+      otherArgs[index] = args[index];\r
+    }\r
+    otherArgs[start] = rest;\r
+    return func.apply(this, otherArgs);\r
+  };\r
+}\r
+\r
+module.exports = restParam;\r
+\r
+},{}],62:[function(require,module,exports){\r
+var baseCreate = require('./baseCreate'),\r
+    baseLodash = require('./baseLodash');\r
+\r
+/** Used as references for `-Infinity` and `Infinity`. */\r
+var POSITIVE_INFINITY = Number.POSITIVE_INFINITY;\r
+\r
+/**\r
+ * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to wrap.\r
+ */\r
+function LazyWrapper(value) {\r
+  this.__wrapped__ = value;\r
+  this.__actions__ = [];\r
+  this.__dir__ = 1;\r
+  this.__filtered__ = false;\r
+  this.__iteratees__ = [];\r
+  this.__takeCount__ = POSITIVE_INFINITY;\r
+  this.__views__ = [];\r
+}\r
+\r
+LazyWrapper.prototype = baseCreate(baseLodash.prototype);\r
+LazyWrapper.prototype.constructor = LazyWrapper;\r
+\r
+module.exports = LazyWrapper;\r
+\r
+},{"./baseCreate":72,"./baseLodash":84}],63:[function(require,module,exports){\r
+var baseCreate = require('./baseCreate'),\r
+    baseLodash = require('./baseLodash');\r
+\r
+/**\r
+ * The base constructor for creating `lodash` wrapper objects.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to wrap.\r
+ * @param {boolean} [chainAll] Enable chaining for all wrapper methods.\r
+ * @param {Array} [actions=[]] Actions to peform to resolve the unwrapped value.\r
+ */\r
+function LodashWrapper(value, chainAll, actions) {\r
+  this.__wrapped__ = value;\r
+  this.__actions__ = actions || [];\r
+  this.__chain__ = !!chainAll;\r
+}\r
+\r
+LodashWrapper.prototype = baseCreate(baseLodash.prototype);\r
+LodashWrapper.prototype.constructor = LodashWrapper;\r
+\r
+module.exports = LodashWrapper;\r
+\r
+},{"./baseCreate":72,"./baseLodash":84}],64:[function(require,module,exports){\r
+/**\r
+ * Copies the values of `source` to `array`.\r
+ *\r
+ * @private\r
+ * @param {Array} source The array to copy values from.\r
+ * @param {Array} [array=[]] The array to copy values to.\r
+ * @returns {Array} Returns `array`.\r
+ */\r
+function arrayCopy(source, array) {\r
+  var index = -1,\r
+      length = source.length;\r
+\r
+  array || (array = Array(length));\r
+  while (++index < length) {\r
+    array[index] = source[index];\r
+  }\r
+  return array;\r
+}\r
+\r
+module.exports = arrayCopy;\r
+\r
+},{}],65:[function(require,module,exports){\r
+/**\r
+ * A specialized version of `_.forEach` for arrays without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Array} Returns `array`.\r
+ */\r
+function arrayEach(array, iteratee) {\r
+  var index = -1,\r
+      length = array.length;\r
+\r
+  while (++index < length) {\r
+    if (iteratee(array[index], index, array) === false) {\r
+      break;\r
+    }\r
+  }\r
+  return array;\r
+}\r
+\r
+module.exports = arrayEach;\r
+\r
+},{}],66:[function(require,module,exports){\r
+/**\r
+ * A specialized version of `_.map` for arrays without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Array} Returns the new mapped array.\r
+ */\r
+function arrayMap(array, iteratee) {\r
+  var index = -1,\r
+      length = array.length,\r
+      result = Array(length);\r
+\r
+  while (++index < length) {\r
+    result[index] = iteratee(array[index], index, array);\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = arrayMap;\r
+\r
+},{}],67:[function(require,module,exports){\r
+/**\r
+ * A specialized version of `_.some` for arrays without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to iterate over.\r
+ * @param {Function} predicate The function invoked per iteration.\r
+ * @returns {boolean} Returns `true` if any element passes the predicate check,\r
+ *  else `false`.\r
+ */\r
+function arraySome(array, predicate) {\r
+  var index = -1,\r
+      length = array.length;\r
+\r
+  while (++index < length) {\r
+    if (predicate(array[index], index, array)) {\r
+      return true;\r
+    }\r
+  }\r
+  return false;\r
+}\r
+\r
+module.exports = arraySome;\r
+\r
+},{}],68:[function(require,module,exports){\r
+var baseCopy = require('./baseCopy'),\r
+    keys = require('../object/keys');\r
+\r
+/**\r
+ * The base implementation of `_.assign` without support for argument juggling,\r
+ * multiple sources, and `customizer` functions.\r
+ *\r
+ * @private\r
+ * @param {Object} object The destination object.\r
+ * @param {Object} source The source object.\r
+ * @returns {Object} Returns `object`.\r
+ */\r
+function baseAssign(object, source) {\r
+  return source == null\r
+    ? object\r
+    : baseCopy(source, keys(source), object);\r
+}\r
+\r
+module.exports = baseAssign;\r
+\r
+},{"../object/keys":151,"./baseCopy":71}],69:[function(require,module,exports){\r
+var baseMatches = require('./baseMatches'),\r
+    baseMatchesProperty = require('./baseMatchesProperty'),\r
+    bindCallback = require('./bindCallback'),\r
+    identity = require('../utility/identity'),\r
+    property = require('../utility/property');\r
+\r
+/**\r
+ * The base implementation of `_.callback` which supports specifying the\r
+ * number of arguments to provide to `func`.\r
+ *\r
+ * @private\r
+ * @param {*} [func=_.identity] The value to convert to a callback.\r
+ * @param {*} [thisArg] The `this` binding of `func`.\r
+ * @param {number} [argCount] The number of arguments to provide to `func`.\r
+ * @returns {Function} Returns the callback.\r
+ */\r
+function baseCallback(func, thisArg, argCount) {\r
+  var type = typeof func;\r
+  if (type == 'function') {\r
+    return thisArg === undefined\r
+      ? func\r
+      : bindCallback(func, thisArg, argCount);\r
+  }\r
+  if (func == null) {\r
+    return identity;\r
+  }\r
+  if (type == 'object') {\r
+    return baseMatches(func);\r
+  }\r
+  return thisArg === undefined\r
+    ? property(func)\r
+    : baseMatchesProperty(func, thisArg);\r
+}\r
+\r
+module.exports = baseCallback;\r
+\r
+},{"../utility/identity":156,"../utility/property":158,"./baseMatches":86,"./baseMatchesProperty":87,"./bindCallback":96}],70:[function(require,module,exports){\r
+var arrayCopy = require('./arrayCopy'),\r
+    arrayEach = require('./arrayEach'),\r
+    baseAssign = require('./baseAssign'),\r
+    baseForOwn = require('./baseForOwn'),\r
+    initCloneArray = require('./initCloneArray'),\r
+    initCloneByTag = require('./initCloneByTag'),\r
+    initCloneObject = require('./initCloneObject'),\r
+    isArray = require('../lang/isArray'),\r
+    isHostObject = require('./isHostObject'),\r
+    isObject = require('../lang/isObject');\r
+\r
+/** `Object#toString` result references. */\r
+var argsTag = '[object Arguments]',\r
+    arrayTag = '[object Array]',\r
+    boolTag = '[object Boolean]',\r
+    dateTag = '[object Date]',\r
+    errorTag = '[object Error]',\r
+    funcTag = '[object Function]',\r
+    mapTag = '[object Map]',\r
+    numberTag = '[object Number]',\r
+    objectTag = '[object Object]',\r
+    regexpTag = '[object RegExp]',\r
+    setTag = '[object Set]',\r
+    stringTag = '[object String]',\r
+    weakMapTag = '[object WeakMap]';\r
+\r
+var arrayBufferTag = '[object ArrayBuffer]',\r
+    float32Tag = '[object Float32Array]',\r
+    float64Tag = '[object Float64Array]',\r
+    int8Tag = '[object Int8Array]',\r
+    int16Tag = '[object Int16Array]',\r
+    int32Tag = '[object Int32Array]',\r
+    uint8Tag = '[object Uint8Array]',\r
+    uint8ClampedTag = '[object Uint8ClampedArray]',\r
+    uint16Tag = '[object Uint16Array]',\r
+    uint32Tag = '[object Uint32Array]';\r
+\r
+/** Used to identify `toStringTag` values supported by `_.clone`. */\r
+var cloneableTags = {};\r
+cloneableTags[argsTag] = cloneableTags[arrayTag] =\r
+cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =\r
+cloneableTags[dateTag] = cloneableTags[float32Tag] =\r
+cloneableTags[float64Tag] = cloneableTags[int8Tag] =\r
+cloneableTags[int16Tag] = cloneableTags[int32Tag] =\r
+cloneableTags[numberTag] = cloneableTags[objectTag] =\r
+cloneableTags[regexpTag] = cloneableTags[stringTag] =\r
+cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\r
+cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\r
+cloneableTags[errorTag] = cloneableTags[funcTag] =\r
+cloneableTags[mapTag] = cloneableTags[setTag] =\r
+cloneableTags[weakMapTag] = false;\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * The base implementation of `_.clone` without support for argument juggling\r
+ * and `this` binding `customizer` functions.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to clone.\r
+ * @param {boolean} [isDeep] Specify a deep clone.\r
+ * @param {Function} [customizer] The function to customize cloning values.\r
+ * @param {string} [key] The key of `value`.\r
+ * @param {Object} [object] The object `value` belongs to.\r
+ * @param {Array} [stackA=[]] Tracks traversed source objects.\r
+ * @param {Array} [stackB=[]] Associates clones with source counterparts.\r
+ * @returns {*} Returns the cloned value.\r
+ */\r
+function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {\r
+  var result;\r
+  if (customizer) {\r
+    result = object ? customizer(value, key, object) : customizer(value);\r
+  }\r
+  if (result !== undefined) {\r
+    return result;\r
+  }\r
+  if (!isObject(value)) {\r
+    return value;\r
+  }\r
+  var isArr = isArray(value);\r
+  if (isArr) {\r
+    result = initCloneArray(value);\r
+    if (!isDeep) {\r
+      return arrayCopy(value, result);\r
+    }\r
+  } else {\r
+    var tag = objToString.call(value),\r
+        isFunc = tag == funcTag;\r
+\r
+    if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\r
+      if (isHostObject(value)) {\r
+        return object ? value : {};\r
+      }\r
+      result = initCloneObject(isFunc ? {} : value);\r
+      if (!isDeep) {\r
+        return baseAssign(result, value);\r
+      }\r
+    } else {\r
+      return cloneableTags[tag]\r
+        ? initCloneByTag(value, tag, isDeep)\r
+        : (object ? value : {});\r
+    }\r
+  }\r
+  // Check for circular references and return its corresponding clone.\r
+  stackA || (stackA = []);\r
+  stackB || (stackB = []);\r
+\r
+  var length = stackA.length;\r
+  while (length--) {\r
+    if (stackA[length] == value) {\r
+      return stackB[length];\r
+    }\r
+  }\r
+  // Add the source value to the stack of traversed objects and associate it with its clone.\r
+  stackA.push(value);\r
+  stackB.push(result);\r
+\r
+  // Recursively populate clone (susceptible to call stack limits).\r
+  (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {\r
+    result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);\r
+  });\r
+  return result;\r
+}\r
+\r
+module.exports = baseClone;\r
+\r
+},{"../lang/isArray":142,"../lang/isObject":146,"./arrayCopy":64,"./arrayEach":65,"./baseAssign":68,"./baseForOwn":78,"./initCloneArray":118,"./initCloneByTag":119,"./initCloneObject":120,"./isHostObject":122}],71:[function(require,module,exports){\r
+/**\r
+ * Copies properties of `source` to `object`.\r
+ *\r
+ * @private\r
+ * @param {Object} source The object to copy properties from.\r
+ * @param {Array} props The property names to copy.\r
+ * @param {Object} [object={}] The object to copy properties to.\r
+ * @returns {Object} Returns `object`.\r
+ */\r
+function baseCopy(source, props, object) {\r
+  object || (object = {});\r
+\r
+  var index = -1,\r
+      length = props.length;\r
+\r
+  while (++index < length) {\r
+    var key = props[index];\r
+    object[key] = source[key];\r
+  }\r
+  return object;\r
+}\r
+\r
+module.exports = baseCopy;\r
+\r
+},{}],72:[function(require,module,exports){\r
+var isObject = require('../lang/isObject');\r
+\r
+/**\r
+ * The base implementation of `_.create` without support for assigning\r
+ * properties to the created object.\r
+ *\r
+ * @private\r
+ * @param {Object} prototype The object to inherit from.\r
+ * @returns {Object} Returns the new object.\r
+ */\r
+var baseCreate = (function() {\r
+  function object() {}\r
+  return function(prototype) {\r
+    if (isObject(prototype)) {\r
+      object.prototype = prototype;\r
+      var result = new object;\r
+      object.prototype = undefined;\r
+    }\r
+    return result || {};\r
+  };\r
+}());\r
+\r
+module.exports = baseCreate;\r
+\r
+},{"../lang/isObject":146}],73:[function(require,module,exports){\r
+var baseForOwn = require('./baseForOwn'),\r
+    createBaseEach = require('./createBaseEach');\r
+\r
+/**\r
+ * The base implementation of `_.forEach` without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array|Object|string} collection The collection to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Array|Object|string} Returns `collection`.\r
+ */\r
+var baseEach = createBaseEach(baseForOwn);\r
+\r
+module.exports = baseEach;\r
+\r
+},{"./baseForOwn":78,"./createBaseEach":100}],74:[function(require,module,exports){\r
+/**\r
+ * The base implementation of `_.find`, `_.findLast`, `_.findKey`, and `_.findLastKey`,\r
+ * without support for callback shorthands and `this` binding, which iterates\r
+ * over `collection` using the provided `eachFunc`.\r
+ *\r
+ * @private\r
+ * @param {Array|Object|string} collection The collection to search.\r
+ * @param {Function} predicate The function invoked per iteration.\r
+ * @param {Function} eachFunc The function to iterate over `collection`.\r
+ * @param {boolean} [retKey] Specify returning the key of the found element\r
+ *  instead of the element itself.\r
+ * @returns {*} Returns the found element or its key, else `undefined`.\r
+ */\r
+function baseFind(collection, predicate, eachFunc, retKey) {\r
+  var result;\r
+  eachFunc(collection, function(value, key, collection) {\r
+    if (predicate(value, key, collection)) {\r
+      result = retKey ? key : value;\r
+      return false;\r
+    }\r
+  });\r
+  return result;\r
+}\r
+\r
+module.exports = baseFind;\r
+\r
+},{}],75:[function(require,module,exports){\r
+/**\r
+ * The base implementation of `_.findIndex` and `_.findLastIndex` without\r
+ * support for callback shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to search.\r
+ * @param {Function} predicate The function invoked per iteration.\r
+ * @param {boolean} [fromRight] Specify iterating from right to left.\r
+ * @returns {number} Returns the index of the matched value, else `-1`.\r
+ */\r
+function baseFindIndex(array, predicate, fromRight) {\r
+  var length = array.length,\r
+      index = fromRight ? length : -1;\r
+\r
+  while ((fromRight ? index-- : ++index < length)) {\r
+    if (predicate(array[index], index, array)) {\r
+      return index;\r
+    }\r
+  }\r
+  return -1;\r
+}\r
+\r
+module.exports = baseFindIndex;\r
+\r
+},{}],76:[function(require,module,exports){\r
+var createBaseFor = require('./createBaseFor');\r
+\r
+/**\r
+ * The base implementation of `baseForIn` and `baseForOwn` which iterates\r
+ * over `object` properties returned by `keysFunc` invoking `iteratee` for\r
+ * each property. Iteratee functions may exit iteration early by explicitly\r
+ * returning `false`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @param {Function} keysFunc The function to get the keys of `object`.\r
+ * @returns {Object} Returns `object`.\r
+ */\r
+var baseFor = createBaseFor();\r
+\r
+module.exports = baseFor;\r
+\r
+},{"./createBaseFor":101}],77:[function(require,module,exports){\r
+var baseFor = require('./baseFor'),\r
+    keysIn = require('../object/keysIn');\r
+\r
+/**\r
+ * The base implementation of `_.forIn` without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Object} Returns `object`.\r
+ */\r
+function baseForIn(object, iteratee) {\r
+  return baseFor(object, iteratee, keysIn);\r
+}\r
+\r
+module.exports = baseForIn;\r
+\r
+},{"../object/keysIn":152,"./baseFor":76}],78:[function(require,module,exports){\r
+var baseFor = require('./baseFor'),\r
+    keys = require('../object/keys');\r
+\r
+/**\r
+ * The base implementation of `_.forOwn` without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Object} Returns `object`.\r
+ */\r
+function baseForOwn(object, iteratee) {\r
+  return baseFor(object, iteratee, keys);\r
+}\r
+\r
+module.exports = baseForOwn;\r
+\r
+},{"../object/keys":151,"./baseFor":76}],79:[function(require,module,exports){\r
+var toObject = require('./toObject');\r
+\r
+/**\r
+ * The base implementation of `get` without support for string paths\r
+ * and default values.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @param {Array} path The path of the property to get.\r
+ * @param {string} [pathKey] The key representation of path.\r
+ * @returns {*} Returns the resolved value.\r
+ */\r
+function baseGet(object, path, pathKey) {\r
+  if (object == null) {\r
+    return;\r
+  }\r
+  object = toObject(object);\r
+  if (pathKey !== undefined && pathKey in object) {\r
+    path = [pathKey];\r
+  }\r
+  var index = 0,\r
+      length = path.length;\r
+\r
+  while (object != null && index < length) {\r
+    object = toObject(object)[path[index++]];\r
+  }\r
+  return (index && index == length) ? object : undefined;\r
+}\r
+\r
+module.exports = baseGet;\r
+\r
+},{"./toObject":137}],80:[function(require,module,exports){\r
+var indexOfNaN = require('./indexOfNaN');\r
+\r
+/**\r
+ * The base implementation of `_.indexOf` without support for binary searches.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to search.\r
+ * @param {*} value The value to search for.\r
+ * @param {number} fromIndex The index to search from.\r
+ * @returns {number} Returns the index of the matched value, else `-1`.\r
+ */\r
+function baseIndexOf(array, value, fromIndex) {\r
+  if (value !== value) {\r
+    return indexOfNaN(array, fromIndex);\r
+  }\r
+  var index = fromIndex - 1,\r
+      length = array.length;\r
+\r
+  while (++index < length) {\r
+    if (array[index] === value) {\r
+      return index;\r
+    }\r
+  }\r
+  return -1;\r
+}\r
+\r
+module.exports = baseIndexOf;\r
+\r
+},{"./indexOfNaN":117}],81:[function(require,module,exports){\r
+var baseIsEqualDeep = require('./baseIsEqualDeep'),\r
+    isObject = require('../lang/isObject'),\r
+    isObjectLike = require('./isObjectLike');\r
+\r
+/**\r
+ * The base implementation of `_.isEqual` without support for `this` binding\r
+ * `customizer` functions.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to compare.\r
+ * @param {*} other The other value to compare.\r
+ * @param {Function} [customizer] The function to customize comparing values.\r
+ * @param {boolean} [isLoose] Specify performing partial comparisons.\r
+ * @param {Array} [stackA] Tracks traversed `value` objects.\r
+ * @param {Array} [stackB] Tracks traversed `other` objects.\r
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\r
+ */\r
+function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {\r
+  if (value === other) {\r
+    return true;\r
+  }\r
+  if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {\r
+    return value !== value && other !== other;\r
+  }\r
+  return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);\r
+}\r
+\r
+module.exports = baseIsEqual;\r
+\r
+},{"../lang/isObject":146,"./baseIsEqualDeep":82,"./isObjectLike":128}],82:[function(require,module,exports){\r
+var equalArrays = require('./equalArrays'),\r
+    equalByTag = require('./equalByTag'),\r
+    equalObjects = require('./equalObjects'),\r
+    isArray = require('../lang/isArray'),\r
+    isHostObject = require('./isHostObject'),\r
+    isTypedArray = require('../lang/isTypedArray');\r
+\r
+/** `Object#toString` result references. */\r
+var argsTag = '[object Arguments]',\r
+    arrayTag = '[object Array]',\r
+    objectTag = '[object Object]';\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * A specialized version of `baseIsEqual` for arrays and objects which performs\r
+ * deep comparisons and tracks traversed objects enabling objects with circular\r
+ * references to be compared.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to compare.\r
+ * @param {Object} other The other object to compare.\r
+ * @param {Function} equalFunc The function to determine equivalents of values.\r
+ * @param {Function} [customizer] The function to customize comparing objects.\r
+ * @param {boolean} [isLoose] Specify performing partial comparisons.\r
+ * @param {Array} [stackA=[]] Tracks traversed `value` objects.\r
+ * @param {Array} [stackB=[]] Tracks traversed `other` objects.\r
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r
+ */\r
+function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\r
+  var objIsArr = isArray(object),\r
+      othIsArr = isArray(other),\r
+      objTag = arrayTag,\r
+      othTag = arrayTag;\r
+\r
+  if (!objIsArr) {\r
+    objTag = objToString.call(object);\r
+    if (objTag == argsTag) {\r
+      objTag = objectTag;\r
+    } else if (objTag != objectTag) {\r
+      objIsArr = isTypedArray(object);\r
+    }\r
+  }\r
+  if (!othIsArr) {\r
+    othTag = objToString.call(other);\r
+    if (othTag == argsTag) {\r
+      othTag = objectTag;\r
+    } else if (othTag != objectTag) {\r
+      othIsArr = isTypedArray(other);\r
+    }\r
+  }\r
+  var objIsObj = objTag == objectTag && !isHostObject(object),\r
+      othIsObj = othTag == objectTag && !isHostObject(other),\r
+      isSameTag = objTag == othTag;\r
+\r
+  if (isSameTag && !(objIsArr || objIsObj)) {\r
+    return equalByTag(object, other, objTag);\r
+  }\r
+  if (!isLoose) {\r
+    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\r
+        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\r
+\r
+    if (objIsWrapped || othIsWrapped) {\r
+      return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);\r
+    }\r
+  }\r
+  if (!isSameTag) {\r
+    return false;\r
+  }\r
+  // Assume cyclic values are equal.\r
+  // For more information on detecting circular references see https://es5.github.io/#JO.\r
+  stackA || (stackA = []);\r
+  stackB || (stackB = []);\r
+\r
+  var length = stackA.length;\r
+  while (length--) {\r
+    if (stackA[length] == object) {\r
+      return stackB[length] == other;\r
+    }\r
+  }\r
+  // Add `object` and `other` to the stack of traversed objects.\r
+  stackA.push(object);\r
+  stackB.push(other);\r
+\r
+  var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);\r
+\r
+  stackA.pop();\r
+  stackB.pop();\r
+\r
+  return result;\r
+}\r
+\r
+module.exports = baseIsEqualDeep;\r
+\r
+},{"../lang/isArray":142,"../lang/isTypedArray":149,"./equalArrays":109,"./equalByTag":110,"./equalObjects":111,"./isHostObject":122}],83:[function(require,module,exports){\r
+var baseIsEqual = require('./baseIsEqual'),\r
+    toObject = require('./toObject');\r
+\r
+/**\r
+ * The base implementation of `_.isMatch` without support for callback\r
+ * shorthands and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to inspect.\r
+ * @param {Array} matchData The propery names, values, and compare flags to match.\r
+ * @param {Function} [customizer] The function to customize comparing objects.\r
+ * @returns {boolean} Returns `true` if `object` is a match, else `false`.\r
+ */\r
+function baseIsMatch(object, matchData, customizer) {\r
+  var index = matchData.length,\r
+      length = index,\r
+      noCustomizer = !customizer;\r
+\r
+  if (object == null) {\r
+    return !length;\r
+  }\r
+  object = toObject(object);\r
+  while (index--) {\r
+    var data = matchData[index];\r
+    if ((noCustomizer && data[2])\r
+          ? data[1] !== object[data[0]]\r
+          : !(data[0] in object)\r
+        ) {\r
+      return false;\r
+    }\r
+  }\r
+  while (++index < length) {\r
+    data = matchData[index];\r
+    var key = data[0],\r
+        objValue = object[key],\r
+        srcValue = data[1];\r
+\r
+    if (noCustomizer && data[2]) {\r
+      if (objValue === undefined && !(key in object)) {\r
+        return false;\r
+      }\r
+    } else {\r
+      var result = customizer ? customizer(objValue, srcValue, key) : undefined;\r
+      if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {\r
+        return false;\r
+      }\r
+    }\r
+  }\r
+  return true;\r
+}\r
+\r
+module.exports = baseIsMatch;\r
+\r
+},{"./baseIsEqual":81,"./toObject":137}],84:[function(require,module,exports){\r
+/**\r
+ * The function whose prototype all chaining wrappers inherit from.\r
+ *\r
+ * @private\r
+ */\r
+function baseLodash() {\r
+  // No operation performed.\r
+}\r
+\r
+module.exports = baseLodash;\r
+\r
+},{}],85:[function(require,module,exports){\r
+var baseEach = require('./baseEach'),\r
+    isArrayLike = require('./isArrayLike');\r
+\r
+/**\r
+ * The base implementation of `_.map` without support for callback shorthands\r
+ * and `this` binding.\r
+ *\r
+ * @private\r
+ * @param {Array|Object|string} collection The collection to iterate over.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @returns {Array} Returns the new mapped array.\r
+ */\r
+function baseMap(collection, iteratee) {\r
+  var index = -1,\r
+      result = isArrayLike(collection) ? Array(collection.length) : [];\r
+\r
+  baseEach(collection, function(value, key, collection) {\r
+    result[++index] = iteratee(value, key, collection);\r
+  });\r
+  return result;\r
+}\r
+\r
+module.exports = baseMap;\r
+\r
+},{"./baseEach":73,"./isArrayLike":121}],86:[function(require,module,exports){\r
+var baseIsMatch = require('./baseIsMatch'),\r
+    getMatchData = require('./getMatchData'),\r
+    toObject = require('./toObject');\r
+\r
+/**\r
+ * The base implementation of `_.matches` which does not clone `source`.\r
+ *\r
+ * @private\r
+ * @param {Object} source The object of property values to match.\r
+ * @returns {Function} Returns the new function.\r
+ */\r
+function baseMatches(source) {\r
+  var matchData = getMatchData(source);\r
+  if (matchData.length == 1 && matchData[0][2]) {\r
+    var key = matchData[0][0],\r
+        value = matchData[0][1];\r
+\r
+    return function(object) {\r
+      if (object == null) {\r
+        return false;\r
+      }\r
+      object = toObject(object);\r
+      return object[key] === value && (value !== undefined || (key in object));\r
+    };\r
+  }\r
+  return function(object) {\r
+    return baseIsMatch(object, matchData);\r
+  };\r
+}\r
+\r
+module.exports = baseMatches;\r
+\r
+},{"./baseIsMatch":83,"./getMatchData":115,"./toObject":137}],87:[function(require,module,exports){\r
+var baseGet = require('./baseGet'),\r
+    baseIsEqual = require('./baseIsEqual'),\r
+    baseSlice = require('./baseSlice'),\r
+    isArray = require('../lang/isArray'),\r
+    isKey = require('./isKey'),\r
+    isStrictComparable = require('./isStrictComparable'),\r
+    last = require('../array/last'),\r
+    toObject = require('./toObject'),\r
+    toPath = require('./toPath');\r
+\r
+/**\r
+ * The base implementation of `_.matchesProperty` which does not clone `srcValue`.\r
+ *\r
+ * @private\r
+ * @param {string} path The path of the property to get.\r
+ * @param {*} srcValue The value to compare.\r
+ * @returns {Function} Returns the new function.\r
+ */\r
+function baseMatchesProperty(path, srcValue) {\r
+  var isArr = isArray(path),\r
+      isCommon = isKey(path) && isStrictComparable(srcValue),\r
+      pathKey = (path + '');\r
+\r
+  path = toPath(path);\r
+  return function(object) {\r
+    if (object == null) {\r
+      return false;\r
+    }\r
+    var key = pathKey;\r
+    object = toObject(object);\r
+    if ((isArr || !isCommon) && !(key in object)) {\r
+      object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));\r
+      if (object == null) {\r
+        return false;\r
+      }\r
+      key = last(path);\r
+      object = toObject(object);\r
+    }\r
+    return object[key] === srcValue\r
+      ? (srcValue !== undefined || (key in object))\r
+      : baseIsEqual(srcValue, object[key], undefined, true);\r
+  };\r
+}\r
+\r
+module.exports = baseMatchesProperty;\r
+\r
+},{"../array/last":52,"../lang/isArray":142,"./baseGet":79,"./baseIsEqual":81,"./baseSlice":91,"./isKey":125,"./isStrictComparable":129,"./toObject":137,"./toPath":138}],88:[function(require,module,exports){\r
+var toObject = require('./toObject');\r
+\r
+/**\r
+ * The base implementation of `_.property` without support for deep paths.\r
+ *\r
+ * @private\r
+ * @param {string} key The key of the property to get.\r
+ * @returns {Function} Returns the new function.\r
+ */\r
+function baseProperty(key) {\r
+  return function(object) {\r
+    return object == null ? undefined : toObject(object)[key];\r
+  };\r
+}\r
+\r
+module.exports = baseProperty;\r
+\r
+},{"./toObject":137}],89:[function(require,module,exports){\r
+var baseGet = require('./baseGet'),\r
+    toPath = require('./toPath');\r
+\r
+/**\r
+ * A specialized version of `baseProperty` which supports deep paths.\r
+ *\r
+ * @private\r
+ * @param {Array|string} path The path of the property to get.\r
+ * @returns {Function} Returns the new function.\r
+ */\r
+function basePropertyDeep(path) {\r
+  var pathKey = (path + '');\r
+  path = toPath(path);\r
+  return function(object) {\r
+    return baseGet(object, path, pathKey);\r
+  };\r
+}\r
+\r
+module.exports = basePropertyDeep;\r
+\r
+},{"./baseGet":79,"./toPath":138}],90:[function(require,module,exports){\r
+var identity = require('../utility/identity'),\r
+    metaMap = require('./metaMap');\r
+\r
+/**\r
+ * The base implementation of `setData` without support for hot loop detection.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to associate metadata with.\r
+ * @param {*} data The metadata.\r
+ * @returns {Function} Returns `func`.\r
+ */\r
+var baseSetData = !metaMap ? identity : function(func, data) {\r
+  metaMap.set(func, data);\r
+  return func;\r
+};\r
+\r
+module.exports = baseSetData;\r
+\r
+},{"../utility/identity":156,"./metaMap":131}],91:[function(require,module,exports){\r
+/**\r
+ * The base implementation of `_.slice` without an iteratee call guard.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to slice.\r
+ * @param {number} [start=0] The start position.\r
+ * @param {number} [end=array.length] The end position.\r
+ * @returns {Array} Returns the slice of `array`.\r
+ */\r
+function baseSlice(array, start, end) {\r
+  var index = -1,\r
+      length = array.length;\r
+\r
+  start = start == null ? 0 : (+start || 0);\r
+  if (start < 0) {\r
+    start = -start > length ? 0 : (length + start);\r
+  }\r
+  end = (end === undefined || end > length) ? length : (+end || 0);\r
+  if (end < 0) {\r
+    end += length;\r
+  }\r
+  length = start > end ? 0 : ((end - start) >>> 0);\r
+  start >>>= 0;\r
+\r
+  var result = Array(length);\r
+  while (++index < length) {\r
+    result[index] = array[index + start];\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = baseSlice;\r
+\r
+},{}],92:[function(require,module,exports){\r
+/**\r
+ * Converts `value` to a string if it's not one. An empty string is returned\r
+ * for `null` or `undefined` values.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to process.\r
+ * @returns {string} Returns the string.\r
+ */\r
+function baseToString(value) {\r
+  return value == null ? '' : (value + '');\r
+}\r
+\r
+module.exports = baseToString;\r
+\r
+},{}],93:[function(require,module,exports){\r
+/**\r
+ * The base implementation of `_.values` and `_.valuesIn` which creates an\r
+ * array of `object` property values corresponding to the property names\r
+ * of `props`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @param {Array} props The property names to get values for.\r
+ * @returns {Object} Returns the array of property values.\r
+ */\r
+function baseValues(object, props) {\r
+  var index = -1,\r
+      length = props.length,\r
+      result = Array(length);\r
+\r
+  while (++index < length) {\r
+    result[index] = object[props[index]];\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = baseValues;\r
+\r
+},{}],94:[function(require,module,exports){\r
+var binaryIndexBy = require('./binaryIndexBy'),\r
+    identity = require('../utility/identity');\r
+\r
+/** Used as references for the maximum length and index of an array. */\r
+var MAX_ARRAY_LENGTH = 4294967295,\r
+    HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;\r
+\r
+/**\r
+ * Performs a binary search of `array` to determine the index at which `value`\r
+ * should be inserted into `array` in order to maintain its sort order.\r
+ *\r
+ * @private\r
+ * @param {Array} array The sorted array to inspect.\r
+ * @param {*} value The value to evaluate.\r
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.\r
+ * @returns {number} Returns the index at which `value` should be inserted\r
+ *  into `array`.\r
+ */\r
+function binaryIndex(array, value, retHighest) {\r
+  var low = 0,\r
+      high = array ? array.length : low;\r
+\r
+  if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {\r
+    while (low < high) {\r
+      var mid = (low + high) >>> 1,\r
+          computed = array[mid];\r
+\r
+      if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {\r
+        low = mid + 1;\r
+      } else {\r
+        high = mid;\r
+      }\r
+    }\r
+    return high;\r
+  }\r
+  return binaryIndexBy(array, value, identity, retHighest);\r
+}\r
+\r
+module.exports = binaryIndex;\r
+\r
+},{"../utility/identity":156,"./binaryIndexBy":95}],95:[function(require,module,exports){\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeFloor = Math.floor,\r
+    nativeMin = Math.min;\r
+\r
+/** Used as references for the maximum length and index of an array. */\r
+var MAX_ARRAY_LENGTH = 4294967295,\r
+    MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1;\r
+\r
+/**\r
+ * This function is like `binaryIndex` except that it invokes `iteratee` for\r
+ * `value` and each element of `array` to compute their sort ranking. The\r
+ * iteratee is invoked with one argument; (value).\r
+ *\r
+ * @private\r
+ * @param {Array} array The sorted array to inspect.\r
+ * @param {*} value The value to evaluate.\r
+ * @param {Function} iteratee The function invoked per iteration.\r
+ * @param {boolean} [retHighest] Specify returning the highest qualified index.\r
+ * @returns {number} Returns the index at which `value` should be inserted\r
+ *  into `array`.\r
+ */\r
+function binaryIndexBy(array, value, iteratee, retHighest) {\r
+  value = iteratee(value);\r
+\r
+  var low = 0,\r
+      high = array ? array.length : 0,\r
+      valIsNaN = value !== value,\r
+      valIsNull = value === null,\r
+      valIsUndef = value === undefined;\r
+\r
+  while (low < high) {\r
+    var mid = nativeFloor((low + high) / 2),\r
+        computed = iteratee(array[mid]),\r
+        isDef = computed !== undefined,\r
+        isReflexive = computed === computed;\r
+\r
+    if (valIsNaN) {\r
+      var setLow = isReflexive || retHighest;\r
+    } else if (valIsNull) {\r
+      setLow = isReflexive && isDef && (retHighest || computed != null);\r
+    } else if (valIsUndef) {\r
+      setLow = isReflexive && (retHighest || isDef);\r
+    } else if (computed == null) {\r
+      setLow = false;\r
+    } else {\r
+      setLow = retHighest ? (computed <= value) : (computed < value);\r
+    }\r
+    if (setLow) {\r
+      low = mid + 1;\r
+    } else {\r
+      high = mid;\r
+    }\r
+  }\r
+  return nativeMin(high, MAX_ARRAY_INDEX);\r
+}\r
+\r
+module.exports = binaryIndexBy;\r
+\r
+},{}],96:[function(require,module,exports){\r
+var identity = require('../utility/identity');\r
+\r
+/**\r
+ * A specialized version of `baseCallback` which only supports `this` binding\r
+ * and specifying the number of arguments to provide to `func`.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to bind.\r
+ * @param {*} thisArg The `this` binding of `func`.\r
+ * @param {number} [argCount] The number of arguments to provide to `func`.\r
+ * @returns {Function} Returns the callback.\r
+ */\r
+function bindCallback(func, thisArg, argCount) {\r
+  if (typeof func != 'function') {\r
+    return identity;\r
+  }\r
+  if (thisArg === undefined) {\r
+    return func;\r
+  }\r
+  switch (argCount) {\r
+    case 1: return function(value) {\r
+      return func.call(thisArg, value);\r
+    };\r
+    case 3: return function(value, index, collection) {\r
+      return func.call(thisArg, value, index, collection);\r
+    };\r
+    case 4: return function(accumulator, value, index, collection) {\r
+      return func.call(thisArg, accumulator, value, index, collection);\r
+    };\r
+    case 5: return function(value, other, key, object, source) {\r
+      return func.call(thisArg, value, other, key, object, source);\r
+    };\r
+  }\r
+  return function() {\r
+    return func.apply(thisArg, arguments);\r
+  };\r
+}\r
+\r
+module.exports = bindCallback;\r
+\r
+},{"../utility/identity":156}],97:[function(require,module,exports){\r
+(function (global){\r
+/** Native method references. */\r
+var ArrayBuffer = global.ArrayBuffer,\r
+    Uint8Array = global.Uint8Array;\r
+\r
+/**\r
+ * Creates a clone of the given array buffer.\r
+ *\r
+ * @private\r
+ * @param {ArrayBuffer} buffer The array buffer to clone.\r
+ * @returns {ArrayBuffer} Returns the cloned array buffer.\r
+ */\r
+function bufferClone(buffer) {\r
+  var result = new ArrayBuffer(buffer.byteLength),\r
+      view = new Uint8Array(result);\r
+\r
+  view.set(new Uint8Array(buffer));\r
+  return result;\r
+}\r
+\r
+module.exports = bufferClone;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2J1ZmZlckNsb25lLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EiLCJmaWxlIjoiZ2VuZXJhdGVkLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBOYXRpdmUgbWV0aG9kIHJlZmVyZW5jZXMuICovXG52YXIgQXJyYXlCdWZmZXIgPSBnbG9iYWwuQXJyYXlCdWZmZXIsXG4gICAgVWludDhBcnJheSA9IGdsb2JhbC5VaW50OEFycmF5O1xuXG4vKipcbiAqIENyZWF0ZXMgYSBjbG9uZSBvZiB0aGUgZ2l2ZW4gYXJyYXkgYnVmZmVyLlxuICpcbiAqIEBwcml2YXRlXG4gKiBAcGFyYW0ge0FycmF5QnVmZmVyfSBidWZmZXIgVGhlIGFycmF5IGJ1ZmZlciB0byBjbG9uZS5cbiAqIEByZXR1cm5zIHtBcnJheUJ1ZmZlcn0gUmV0dXJucyB0aGUgY2xvbmVkIGFycmF5IGJ1ZmZlci5cbiAqL1xuZnVuY3Rpb24gYnVmZmVyQ2xvbmUoYnVmZmVyKSB7XG4gIHZhciByZXN1bHQgPSBuZXcgQXJyYXlCdWZmZXIoYnVmZmVyLmJ5dGVMZW5ndGgpLFxuICAgICAgdmlldyA9IG5ldyBVaW50OEFycmF5KHJlc3VsdCk7XG5cbiAgdmlldy5zZXQobmV3IFVpbnQ4QXJyYXkoYnVmZmVyKSk7XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gYnVmZmVyQ2xvbmU7XG4iXX0=\r
+},{}],98:[function(require,module,exports){\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Creates an array that is the composition of partially applied arguments,\r
+ * placeholders, and provided arguments into a single array of arguments.\r
+ *\r
+ * @private\r
+ * @param {Array|Object} args The provided arguments.\r
+ * @param {Array} partials The arguments to prepend to those provided.\r
+ * @param {Array} holders The `partials` placeholder indexes.\r
+ * @returns {Array} Returns the new array of composed arguments.\r
+ */\r
+function composeArgs(args, partials, holders) {\r
+  var holdersLength = holders.length,\r
+      argsIndex = -1,\r
+      argsLength = nativeMax(args.length - holdersLength, 0),\r
+      leftIndex = -1,\r
+      leftLength = partials.length,\r
+      result = Array(leftLength + argsLength);\r
+\r
+  while (++leftIndex < leftLength) {\r
+    result[leftIndex] = partials[leftIndex];\r
+  }\r
+  while (++argsIndex < holdersLength) {\r
+    result[holders[argsIndex]] = args[argsIndex];\r
+  }\r
+  while (argsLength--) {\r
+    result[leftIndex++] = args[argsIndex++];\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = composeArgs;\r
+\r
+},{}],99:[function(require,module,exports){\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * This function is like `composeArgs` except that the arguments composition\r
+ * is tailored for `_.partialRight`.\r
+ *\r
+ * @private\r
+ * @param {Array|Object} args The provided arguments.\r
+ * @param {Array} partials The arguments to append to those provided.\r
+ * @param {Array} holders The `partials` placeholder indexes.\r
+ * @returns {Array} Returns the new array of composed arguments.\r
+ */\r
+function composeArgsRight(args, partials, holders) {\r
+  var holdersIndex = -1,\r
+      holdersLength = holders.length,\r
+      argsIndex = -1,\r
+      argsLength = nativeMax(args.length - holdersLength, 0),\r
+      rightIndex = -1,\r
+      rightLength = partials.length,\r
+      result = Array(argsLength + rightLength);\r
+\r
+  while (++argsIndex < argsLength) {\r
+    result[argsIndex] = args[argsIndex];\r
+  }\r
+  var offset = argsIndex;\r
+  while (++rightIndex < rightLength) {\r
+    result[offset + rightIndex] = partials[rightIndex];\r
+  }\r
+  while (++holdersIndex < holdersLength) {\r
+    result[offset + holders[holdersIndex]] = args[argsIndex++];\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = composeArgsRight;\r
+\r
+},{}],100:[function(require,module,exports){\r
+var getLength = require('./getLength'),\r
+    isLength = require('./isLength'),\r
+    toObject = require('./toObject');\r
+\r
+/**\r
+ * Creates a `baseEach` or `baseEachRight` function.\r
+ *\r
+ * @private\r
+ * @param {Function} eachFunc The function to iterate over a collection.\r
+ * @param {boolean} [fromRight] Specify iterating from right to left.\r
+ * @returns {Function} Returns the new base function.\r
+ */\r
+function createBaseEach(eachFunc, fromRight) {\r
+  return function(collection, iteratee) {\r
+    var length = collection ? getLength(collection) : 0;\r
+    if (!isLength(length)) {\r
+      return eachFunc(collection, iteratee);\r
+    }\r
+    var index = fromRight ? length : -1,\r
+        iterable = toObject(collection);\r
+\r
+    while ((fromRight ? index-- : ++index < length)) {\r
+      if (iteratee(iterable[index], index, iterable) === false) {\r
+        break;\r
+      }\r
+    }\r
+    return collection;\r
+  };\r
+}\r
+\r
+module.exports = createBaseEach;\r
+\r
+},{"./getLength":114,"./isLength":127,"./toObject":137}],101:[function(require,module,exports){\r
+var toObject = require('./toObject');\r
+\r
+/**\r
+ * Creates a base function for `_.forIn` or `_.forInRight`.\r
+ *\r
+ * @private\r
+ * @param {boolean} [fromRight] Specify iterating from right to left.\r
+ * @returns {Function} Returns the new base function.\r
+ */\r
+function createBaseFor(fromRight) {\r
+  return function(object, iteratee, keysFunc) {\r
+    var iterable = toObject(object),\r
+        props = keysFunc(object),\r
+        length = props.length,\r
+        index = fromRight ? length : -1;\r
+\r
+    while ((fromRight ? index-- : ++index < length)) {\r
+      var key = props[index];\r
+      if (iteratee(iterable[key], key, iterable) === false) {\r
+        break;\r
+      }\r
+    }\r
+    return object;\r
+  };\r
+}\r
+\r
+module.exports = createBaseFor;\r
+\r
+},{"./toObject":137}],102:[function(require,module,exports){\r
+(function (global){\r
+var createCtorWrapper = require('./createCtorWrapper');\r
+\r
+/**\r
+ * Creates a function that wraps `func` and invokes it with the `this`\r
+ * binding of `thisArg`.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to bind.\r
+ * @param {*} [thisArg] The `this` binding of `func`.\r
+ * @returns {Function} Returns the new bound function.\r
+ */\r
+function createBindWrapper(func, thisArg) {\r
+  var Ctor = createCtorWrapper(func);\r
+\r
+  function wrapper() {\r
+    var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;\r
+    return fn.apply(thisArg, arguments);\r
+  }\r
+  return wrapper;\r
+}\r
+\r
+module.exports = createBindWrapper;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUJpbmRXcmFwcGVyLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgY3JlYXRlQ3RvcldyYXBwZXIgPSByZXF1aXJlKCcuL2NyZWF0ZUN0b3JXcmFwcGVyJyk7XG5cbi8qKlxuICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgd3JhcHMgYGZ1bmNgIGFuZCBpbnZva2VzIGl0IHdpdGggdGhlIGB0aGlzYFxuICogYmluZGluZyBvZiBgdGhpc0FyZ2AuXG4gKlxuICogQHByaXZhdGVcbiAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGJpbmQuXG4gKiBAcGFyYW0geyp9IFt0aGlzQXJnXSBUaGUgYHRoaXNgIGJpbmRpbmcgb2YgYGZ1bmNgLlxuICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBuZXcgYm91bmQgZnVuY3Rpb24uXG4gKi9cbmZ1bmN0aW9uIGNyZWF0ZUJpbmRXcmFwcGVyKGZ1bmMsIHRoaXNBcmcpIHtcbiAgdmFyIEN0b3IgPSBjcmVhdGVDdG9yV3JhcHBlcihmdW5jKTtcblxuICBmdW5jdGlvbiB3cmFwcGVyKCkge1xuICAgIHZhciBmbiA9ICh0aGlzICYmIHRoaXMgIT09IGdsb2JhbCAmJiB0aGlzIGluc3RhbmNlb2Ygd3JhcHBlcikgPyBDdG9yIDogZnVuYztcbiAgICByZXR1cm4gZm4uYXBwbHkodGhpc0FyZywgYXJndW1lbnRzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVCaW5kV3JhcHBlcjtcbiJdfQ==\r
+},{"./createCtorWrapper":103}],103:[function(require,module,exports){\r
+var baseCreate = require('./baseCreate'),\r
+    isObject = require('../lang/isObject');\r
+\r
+/**\r
+ * Creates a function that produces an instance of `Ctor` regardless of\r
+ * whether it was invoked as part of a `new` expression or by `call` or `apply`.\r
+ *\r
+ * @private\r
+ * @param {Function} Ctor The constructor to wrap.\r
+ * @returns {Function} Returns the new wrapped function.\r
+ */\r
+function createCtorWrapper(Ctor) {\r
+  return function() {\r
+    // Use a `switch` statement to work with class constructors.\r
+    // See http://ecma-international.org/ecma-262/6.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist\r
+    // for more details.\r
+    var args = arguments;\r
+    switch (args.length) {\r
+      case 0: return new Ctor;\r
+      case 1: return new Ctor(args[0]);\r
+      case 2: return new Ctor(args[0], args[1]);\r
+      case 3: return new Ctor(args[0], args[1], args[2]);\r
+      case 4: return new Ctor(args[0], args[1], args[2], args[3]);\r
+      case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);\r
+      case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);\r
+      case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);\r
+    }\r
+    var thisBinding = baseCreate(Ctor.prototype),\r
+        result = Ctor.apply(thisBinding, args);\r
+\r
+    // Mimic the constructor's `return` behavior.\r
+    // See https://es5.github.io/#x13.2.2 for more details.\r
+    return isObject(result) ? result : thisBinding;\r
+  };\r
+}\r
+\r
+module.exports = createCtorWrapper;\r
+\r
+},{"../lang/isObject":146,"./baseCreate":72}],104:[function(require,module,exports){\r
+var baseCallback = require('./baseCallback'),\r
+    baseFind = require('./baseFind'),\r
+    baseFindIndex = require('./baseFindIndex'),\r
+    isArray = require('../lang/isArray');\r
+\r
+/**\r
+ * Creates a `_.find` or `_.findLast` function.\r
+ *\r
+ * @private\r
+ * @param {Function} eachFunc The function to iterate over a collection.\r
+ * @param {boolean} [fromRight] Specify iterating from right to left.\r
+ * @returns {Function} Returns the new find function.\r
+ */\r
+function createFind(eachFunc, fromRight) {\r
+  return function(collection, predicate, thisArg) {\r
+    predicate = baseCallback(predicate, thisArg, 3);\r
+    if (isArray(collection)) {\r
+      var index = baseFindIndex(collection, predicate, fromRight);\r
+      return index > -1 ? collection[index] : undefined;\r
+    }\r
+    return baseFind(collection, predicate, eachFunc);\r
+  };\r
+}\r
+\r
+module.exports = createFind;\r
+\r
+},{"../lang/isArray":142,"./baseCallback":69,"./baseFind":74,"./baseFindIndex":75}],105:[function(require,module,exports){\r
+var bindCallback = require('./bindCallback'),\r
+    isArray = require('../lang/isArray');\r
+\r
+/**\r
+ * Creates a function for `_.forEach` or `_.forEachRight`.\r
+ *\r
+ * @private\r
+ * @param {Function} arrayFunc The function to iterate over an array.\r
+ * @param {Function} eachFunc The function to iterate over a collection.\r
+ * @returns {Function} Returns the new each function.\r
+ */\r
+function createForEach(arrayFunc, eachFunc) {\r
+  return function(collection, iteratee, thisArg) {\r
+    return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))\r
+      ? arrayFunc(collection, iteratee)\r
+      : eachFunc(collection, bindCallback(iteratee, thisArg, 3));\r
+  };\r
+}\r
+\r
+module.exports = createForEach;\r
+\r
+},{"../lang/isArray":142,"./bindCallback":96}],106:[function(require,module,exports){\r
+(function (global){\r
+var arrayCopy = require('./arrayCopy'),\r
+    composeArgs = require('./composeArgs'),\r
+    composeArgsRight = require('./composeArgsRight'),\r
+    createCtorWrapper = require('./createCtorWrapper'),\r
+    isLaziable = require('./isLaziable'),\r
+    reorder = require('./reorder'),\r
+    replaceHolders = require('./replaceHolders'),\r
+    setData = require('./setData');\r
+\r
+/** Used to compose bitmasks for wrapper metadata. */\r
+var BIND_FLAG = 1,\r
+    BIND_KEY_FLAG = 2,\r
+    CURRY_BOUND_FLAG = 4,\r
+    CURRY_FLAG = 8,\r
+    CURRY_RIGHT_FLAG = 16,\r
+    PARTIAL_FLAG = 32,\r
+    PARTIAL_RIGHT_FLAG = 64,\r
+    ARY_FLAG = 128;\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Creates a function that wraps `func` and invokes it with optional `this`\r
+ * binding of, partial application, and currying.\r
+ *\r
+ * @private\r
+ * @param {Function|string} func The function or method name to reference.\r
+ * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.\r
+ * @param {*} [thisArg] The `this` binding of `func`.\r
+ * @param {Array} [partials] The arguments to prepend to those provided to the new function.\r
+ * @param {Array} [holders] The `partials` placeholder indexes.\r
+ * @param {Array} [partialsRight] The arguments to append to those provided to the new function.\r
+ * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\r
+ * @param {Array} [argPos] The argument positions of the new function.\r
+ * @param {number} [ary] The arity cap of `func`.\r
+ * @param {number} [arity] The arity of `func`.\r
+ * @returns {Function} Returns the new wrapped function.\r
+ */\r
+function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\r
+  var isAry = bitmask & ARY_FLAG,\r
+      isBind = bitmask & BIND_FLAG,\r
+      isBindKey = bitmask & BIND_KEY_FLAG,\r
+      isCurry = bitmask & CURRY_FLAG,\r
+      isCurryBound = bitmask & CURRY_BOUND_FLAG,\r
+      isCurryRight = bitmask & CURRY_RIGHT_FLAG,\r
+      Ctor = isBindKey ? undefined : createCtorWrapper(func);\r
+\r
+  function wrapper() {\r
+    // Avoid `arguments` object use disqualifying optimizations by\r
+    // converting it to an array before providing it to other functions.\r
+    var length = arguments.length,\r
+        index = length,\r
+        args = Array(length);\r
+\r
+    while (index--) {\r
+      args[index] = arguments[index];\r
+    }\r
+    if (partials) {\r
+      args = composeArgs(args, partials, holders);\r
+    }\r
+    if (partialsRight) {\r
+      args = composeArgsRight(args, partialsRight, holdersRight);\r
+    }\r
+    if (isCurry || isCurryRight) {\r
+      var placeholder = wrapper.placeholder,\r
+          argsHolders = replaceHolders(args, placeholder);\r
+\r
+      length -= argsHolders.length;\r
+      if (length < arity) {\r
+        var newArgPos = argPos ? arrayCopy(argPos) : undefined,\r
+            newArity = nativeMax(arity - length, 0),\r
+            newsHolders = isCurry ? argsHolders : undefined,\r
+            newHoldersRight = isCurry ? undefined : argsHolders,\r
+            newPartials = isCurry ? args : undefined,\r
+            newPartialsRight = isCurry ? undefined : args;\r
+\r
+        bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);\r
+        bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);\r
+\r
+        if (!isCurryBound) {\r
+          bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);\r
+        }\r
+        var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],\r
+            result = createHybridWrapper.apply(undefined, newData);\r
+\r
+        if (isLaziable(func)) {\r
+          setData(result, newData);\r
+        }\r
+        result.placeholder = placeholder;\r
+        return result;\r
+      }\r
+    }\r
+    var thisBinding = isBind ? thisArg : this,\r
+        fn = isBindKey ? thisBinding[func] : func;\r
+\r
+    if (argPos) {\r
+      args = reorder(args, argPos);\r
+    }\r
+    if (isAry && ary < args.length) {\r
+      args.length = ary;\r
+    }\r
+    if (this && this !== global && this instanceof wrapper) {\r
+      fn = Ctor || createCtorWrapper(func);\r
+    }\r
+    return fn.apply(thisBinding, args);\r
+  }\r
+  return wrapper;\r
+}\r
+\r
+module.exports = createHybridWrapper;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZUh5YnJpZFdyYXBwZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO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composeArgsRight":99,"./createCtorWrapper":103,"./isLaziable":126,"./reorder":133,"./replaceHolders":134,"./setData":135}],107:[function(require,module,exports){\r
+(function (global){\r
+var createCtorWrapper = require('./createCtorWrapper');\r
+\r
+/** Used to compose bitmasks for wrapper metadata. */\r
+var BIND_FLAG = 1;\r
+\r
+/**\r
+ * Creates a function that wraps `func` and invokes it with the optional `this`\r
+ * binding of `thisArg` and the `partials` prepended to those provided to\r
+ * the wrapper.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to partially apply arguments to.\r
+ * @param {number} bitmask The bitmask of flags. See `createWrapper` for more details.\r
+ * @param {*} thisArg The `this` binding of `func`.\r
+ * @param {Array} partials The arguments to prepend to those provided to the new function.\r
+ * @returns {Function} Returns the new bound function.\r
+ */\r
+function createPartialWrapper(func, bitmask, thisArg, partials) {\r
+  var isBind = bitmask & BIND_FLAG,\r
+      Ctor = createCtorWrapper(func);\r
+\r
+  function wrapper() {\r
+    // Avoid `arguments` object use disqualifying optimizations by\r
+    // converting it to an array before providing it `func`.\r
+    var argsIndex = -1,\r
+        argsLength = arguments.length,\r
+        leftIndex = -1,\r
+        leftLength = partials.length,\r
+        args = Array(leftLength + argsLength);\r
+\r
+    while (++leftIndex < leftLength) {\r
+      args[leftIndex] = partials[leftIndex];\r
+    }\r
+    while (argsLength--) {\r
+      args[leftIndex++] = arguments[++argsIndex];\r
+    }\r
+    var fn = (this && this !== global && this instanceof wrapper) ? Ctor : func;\r
+    return fn.apply(isBind ? thisArg : this, args);\r
+  }\r
+  return wrapper;\r
+}\r
+\r
+module.exports = createPartialWrapper;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2NyZWF0ZVBhcnRpYWxXcmFwcGVyLmpzI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ICB9XG4gICAgd2hpbGUgKGFyZ3NMZW5ndGgtLSkge1xuICAgICAgYXJnc1tsZWZ0SW5kZXgrK10gPSBhcmd1bWVudHNbKythcmdzSW5kZXhdO1xuICAgIH1cbiAgICB2YXIgZm4gPSAodGhpcyAmJiB0aGlzICE9PSBnbG9iYWwgJiYgdGhpcyBpbnN0YW5jZW9mIHdyYXBwZXIpID8gQ3RvciA6IGZ1bmM7XG4gICAgcmV0dXJuIGZuLmFwcGx5KGlzQmluZCA/IHRoaXNBcmcgOiB0aGlzLCBhcmdzKTtcbiAgfVxuICByZXR1cm4gd3JhcHBlcjtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBjcmVhdGVQYXJ0aWFsV3JhcHBlcjtcbiJdfQ==\r
+},{"./createCtorWrapper":103}],108:[function(require,module,exports){\r
+var baseSetData = require('./baseSetData'),\r
+    createBindWrapper = require('./createBindWrapper'),\r
+    createHybridWrapper = require('./createHybridWrapper'),\r
+    createPartialWrapper = require('./createPartialWrapper'),\r
+    getData = require('./getData'),\r
+    mergeData = require('./mergeData'),\r
+    setData = require('./setData');\r
+\r
+/** Used to compose bitmasks for wrapper metadata. */\r
+var BIND_FLAG = 1,\r
+    BIND_KEY_FLAG = 2,\r
+    PARTIAL_FLAG = 32,\r
+    PARTIAL_RIGHT_FLAG = 64;\r
+\r
+/** Used as the `TypeError` message for "Functions" methods. */\r
+var FUNC_ERROR_TEXT = 'Expected a function';\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMax = Math.max;\r
+\r
+/**\r
+ * Creates a function that either curries or invokes `func` with optional\r
+ * `this` binding and partially applied arguments.\r
+ *\r
+ * @private\r
+ * @param {Function|string} func The function or method name to reference.\r
+ * @param {number} bitmask The bitmask of flags.\r
+ *  The bitmask may be composed of the following flags:\r
+ *     1 - `_.bind`\r
+ *     2 - `_.bindKey`\r
+ *     4 - `_.curry` or `_.curryRight` of a bound function\r
+ *     8 - `_.curry`\r
+ *    16 - `_.curryRight`\r
+ *    32 - `_.partial`\r
+ *    64 - `_.partialRight`\r
+ *   128 - `_.rearg`\r
+ *   256 - `_.ary`\r
+ * @param {*} [thisArg] The `this` binding of `func`.\r
+ * @param {Array} [partials] The arguments to be partially applied.\r
+ * @param {Array} [holders] The `partials` placeholder indexes.\r
+ * @param {Array} [argPos] The argument positions of the new function.\r
+ * @param {number} [ary] The arity cap of `func`.\r
+ * @param {number} [arity] The arity of `func`.\r
+ * @returns {Function} Returns the new wrapped function.\r
+ */\r
+function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {\r
+  var isBindKey = bitmask & BIND_KEY_FLAG;\r
+  if (!isBindKey && typeof func != 'function') {\r
+    throw new TypeError(FUNC_ERROR_TEXT);\r
+  }\r
+  var length = partials ? partials.length : 0;\r
+  if (!length) {\r
+    bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);\r
+    partials = holders = undefined;\r
+  }\r
+  length -= (holders ? holders.length : 0);\r
+  if (bitmask & PARTIAL_RIGHT_FLAG) {\r
+    var partialsRight = partials,\r
+        holdersRight = holders;\r
+\r
+    partials = holders = undefined;\r
+  }\r
+  var data = isBindKey ? undefined : getData(func),\r
+      newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];\r
+\r
+  if (data) {\r
+    mergeData(newData, data);\r
+    bitmask = newData[1];\r
+    arity = newData[9];\r
+  }\r
+  newData[9] = arity == null\r
+    ? (isBindKey ? 0 : func.length)\r
+    : (nativeMax(arity - length, 0) || 0);\r
+\r
+  if (bitmask == BIND_FLAG) {\r
+    var result = createBindWrapper(newData[0], newData[2]);\r
+  } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {\r
+    result = createPartialWrapper.apply(undefined, newData);\r
+  } else {\r
+    result = createHybridWrapper.apply(undefined, newData);\r
+  }\r
+  var setter = data ? baseSetData : setData;\r
+  return setter(result, newData);\r
+}\r
+\r
+module.exports = createWrapper;\r
+\r
+},{"./baseSetData":90,"./createBindWrapper":102,"./createHybridWrapper":106,"./createPartialWrapper":107,"./getData":112,"./mergeData":130,"./setData":135}],109:[function(require,module,exports){\r
+var arraySome = require('./arraySome');\r
+\r
+/**\r
+ * A specialized version of `baseIsEqualDeep` for arrays with support for\r
+ * partial deep comparisons.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to compare.\r
+ * @param {Array} other The other array to compare.\r
+ * @param {Function} equalFunc The function to determine equivalents of values.\r
+ * @param {Function} [customizer] The function to customize comparing arrays.\r
+ * @param {boolean} [isLoose] Specify performing partial comparisons.\r
+ * @param {Array} [stackA] Tracks traversed `value` objects.\r
+ * @param {Array} [stackB] Tracks traversed `other` objects.\r
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\r
+ */\r
+function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {\r
+  var index = -1,\r
+      arrLength = array.length,\r
+      othLength = other.length;\r
+\r
+  if (arrLength != othLength && !(isLoose && othLength > arrLength)) {\r
+    return false;\r
+  }\r
+  // Ignore non-index properties.\r
+  while (++index < arrLength) {\r
+    var arrValue = array[index],\r
+        othValue = other[index],\r
+        result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;\r
+\r
+    if (result !== undefined) {\r
+      if (result) {\r
+        continue;\r
+      }\r
+      return false;\r
+    }\r
+    // Recursively compare arrays (susceptible to call stack limits).\r
+    if (isLoose) {\r
+      if (!arraySome(other, function(othValue) {\r
+            return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);\r
+          })) {\r
+        return false;\r
+      }\r
+    } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {\r
+      return false;\r
+    }\r
+  }\r
+  return true;\r
+}\r
+\r
+module.exports = equalArrays;\r
+\r
+},{"./arraySome":67}],110:[function(require,module,exports){\r
+/** `Object#toString` result references. */\r
+var boolTag = '[object Boolean]',\r
+    dateTag = '[object Date]',\r
+    errorTag = '[object Error]',\r
+    numberTag = '[object Number]',\r
+    regexpTag = '[object RegExp]',\r
+    stringTag = '[object String]';\r
+\r
+/**\r
+ * A specialized version of `baseIsEqualDeep` for comparing objects of\r
+ * the same `toStringTag`.\r
+ *\r
+ * **Note:** This function only supports comparing values with tags of\r
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to compare.\r
+ * @param {Object} other The other object to compare.\r
+ * @param {string} tag The `toStringTag` of the objects to compare.\r
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r
+ */\r
+function equalByTag(object, other, tag) {\r
+  switch (tag) {\r
+    case boolTag:\r
+    case dateTag:\r
+      // Coerce dates and booleans to numbers, dates to milliseconds and booleans\r
+      // to `1` or `0` treating invalid dates coerced to `NaN` as not equal.\r
+      return +object == +other;\r
+\r
+    case errorTag:\r
+      return object.name == other.name && object.message == other.message;\r
+\r
+    case numberTag:\r
+      // Treat `NaN` vs. `NaN` as equal.\r
+      return (object != +object)\r
+        ? other != +other\r
+        : object == +other;\r
+\r
+    case regexpTag:\r
+    case stringTag:\r
+      // Coerce regexes to strings and treat strings primitives and string\r
+      // objects as equal. See https://es5.github.io/#x15.10.6.4 for more details.\r
+      return object == (other + '');\r
+  }\r
+  return false;\r
+}\r
+\r
+module.exports = equalByTag;\r
+\r
+},{}],111:[function(require,module,exports){\r
+var keys = require('../object/keys');\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * A specialized version of `baseIsEqualDeep` for objects with support for\r
+ * partial deep comparisons.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to compare.\r
+ * @param {Object} other The other object to compare.\r
+ * @param {Function} equalFunc The function to determine equivalents of values.\r
+ * @param {Function} [customizer] The function to customize comparing values.\r
+ * @param {boolean} [isLoose] Specify performing partial comparisons.\r
+ * @param {Array} [stackA] Tracks traversed `value` objects.\r
+ * @param {Array} [stackB] Tracks traversed `other` objects.\r
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\r
+ */\r
+function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {\r
+  var objProps = keys(object),\r
+      objLength = objProps.length,\r
+      othProps = keys(other),\r
+      othLength = othProps.length;\r
+\r
+  if (objLength != othLength && !isLoose) {\r
+    return false;\r
+  }\r
+  var index = objLength;\r
+  while (index--) {\r
+    var key = objProps[index];\r
+    if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {\r
+      return false;\r
+    }\r
+  }\r
+  var skipCtor = isLoose;\r
+  while (++index < objLength) {\r
+    key = objProps[index];\r
+    var objValue = object[key],\r
+        othValue = other[key],\r
+        result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;\r
+\r
+    // Recursively compare objects (susceptible to call stack limits).\r
+    if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {\r
+      return false;\r
+    }\r
+    skipCtor || (skipCtor = key == 'constructor');\r
+  }\r
+  if (!skipCtor) {\r
+    var objCtor = object.constructor,\r
+        othCtor = other.constructor;\r
+\r
+    // Non `Object` object instances with different constructors are not equal.\r
+    if (objCtor != othCtor &&\r
+        ('constructor' in object && 'constructor' in other) &&\r
+        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\r
+          typeof othCtor == 'function' && othCtor instanceof othCtor)) {\r
+      return false;\r
+    }\r
+  }\r
+  return true;\r
+}\r
+\r
+module.exports = equalObjects;\r
+\r
+},{"../object/keys":151}],112:[function(require,module,exports){\r
+var metaMap = require('./metaMap'),\r
+    noop = require('../utility/noop');\r
+\r
+/**\r
+ * Gets metadata for `func`.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to query.\r
+ * @returns {*} Returns the metadata for `func`.\r
+ */\r
+var getData = !metaMap ? noop : function(func) {\r
+  return metaMap.get(func);\r
+};\r
+\r
+module.exports = getData;\r
+\r
+},{"../utility/noop":157,"./metaMap":131}],113:[function(require,module,exports){\r
+var realNames = require('./realNames');\r
+\r
+/**\r
+ * Gets the name of `func`.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to query.\r
+ * @returns {string} Returns the function name.\r
+ */\r
+function getFuncName(func) {\r
+  var result = (func.name + ''),\r
+      array = realNames[result],\r
+      length = array ? array.length : 0;\r
+\r
+  while (length--) {\r
+    var data = array[length],\r
+        otherFunc = data.func;\r
+    if (otherFunc == null || otherFunc == func) {\r
+      return data.name;\r
+    }\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = getFuncName;\r
+\r
+},{"./realNames":132}],114:[function(require,module,exports){\r
+var baseProperty = require('./baseProperty');\r
+\r
+/**\r
+ * Gets the "length" property value of `object`.\r
+ *\r
+ * **Note:** This function is used to avoid a [JIT bug](https://bugs.webkit.org/show_bug.cgi?id=142792)\r
+ * that affects Safari on at least iOS 8.1-8.3 ARM64.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @returns {*} Returns the "length" value.\r
+ */\r
+var getLength = baseProperty('length');\r
+\r
+module.exports = getLength;\r
+\r
+},{"./baseProperty":88}],115:[function(require,module,exports){\r
+var isStrictComparable = require('./isStrictComparable'),\r
+    pairs = require('../object/pairs');\r
+\r
+/**\r
+ * Gets the propery names, values, and compare flags of `object`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the match data of `object`.\r
+ */\r
+function getMatchData(object) {\r
+  var result = pairs(object),\r
+      length = result.length;\r
+\r
+  while (length--) {\r
+    result[length][2] = isStrictComparable(result[length][1]);\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = getMatchData;\r
+\r
+},{"../object/pairs":153,"./isStrictComparable":129}],116:[function(require,module,exports){\r
+var isNative = require('../lang/isNative');\r
+\r
+/**\r
+ * Gets the native function at `key` of `object`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @param {string} key The key of the method to get.\r
+ * @returns {*} Returns the function if it's native, else `undefined`.\r
+ */\r
+function getNative(object, key) {\r
+  var value = object == null ? undefined : object[key];\r
+  return isNative(value) ? value : undefined;\r
+}\r
+\r
+module.exports = getNative;\r
+\r
+},{"../lang/isNative":145}],117:[function(require,module,exports){\r
+/**\r
+ * Gets the index at which the first occurrence of `NaN` is found in `array`.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to search.\r
+ * @param {number} fromIndex The index to search from.\r
+ * @param {boolean} [fromRight] Specify iterating from right to left.\r
+ * @returns {number} Returns the index of the matched `NaN`, else `-1`.\r
+ */\r
+function indexOfNaN(array, fromIndex, fromRight) {\r
+  var length = array.length,\r
+      index = fromIndex + (fromRight ? 0 : -1);\r
+\r
+  while ((fromRight ? index-- : ++index < length)) {\r
+    var other = array[index];\r
+    if (other !== other) {\r
+      return index;\r
+    }\r
+  }\r
+  return -1;\r
+}\r
+\r
+module.exports = indexOfNaN;\r
+\r
+},{}],118:[function(require,module,exports){\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * Initializes an array clone.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to clone.\r
+ * @returns {Array} Returns the initialized clone.\r
+ */\r
+function initCloneArray(array) {\r
+  var length = array.length,\r
+      result = new array.constructor(length);\r
+\r
+  // Add array properties assigned by `RegExp#exec`.\r
+  if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\r
+    result.index = array.index;\r
+    result.input = array.input;\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = initCloneArray;\r
+\r
+},{}],119:[function(require,module,exports){\r
+(function (global){\r
+var bufferClone = require('./bufferClone');\r
+\r
+/** `Object#toString` result references. */\r
+var boolTag = '[object Boolean]',\r
+    dateTag = '[object Date]',\r
+    numberTag = '[object Number]',\r
+    regexpTag = '[object RegExp]',\r
+    stringTag = '[object String]';\r
+\r
+var arrayBufferTag = '[object ArrayBuffer]',\r
+    float32Tag = '[object Float32Array]',\r
+    float64Tag = '[object Float64Array]',\r
+    int8Tag = '[object Int8Array]',\r
+    int16Tag = '[object Int16Array]',\r
+    int32Tag = '[object Int32Array]',\r
+    uint8Tag = '[object Uint8Array]',\r
+    uint8ClampedTag = '[object Uint8ClampedArray]',\r
+    uint16Tag = '[object Uint16Array]',\r
+    uint32Tag = '[object Uint32Array]';\r
+\r
+/** Used to match `RegExp` flags from their coerced string values. */\r
+var reFlags = /\w*$/;\r
+\r
+/** Native method references. */\r
+var Uint8Array = global.Uint8Array;\r
+\r
+/** Used to lookup a type array constructors by `toStringTag`. */\r
+var ctorByTag = {};\r
+ctorByTag[float32Tag] = global.Float32Array;\r
+ctorByTag[float64Tag] = global.Float64Array;\r
+ctorByTag[int8Tag] = global.Int8Array;\r
+ctorByTag[int16Tag] = global.Int16Array;\r
+ctorByTag[int32Tag] = global.Int32Array;\r
+ctorByTag[uint8Tag] = Uint8Array;\r
+ctorByTag[uint8ClampedTag] = global.Uint8ClampedArray;\r
+ctorByTag[uint16Tag] = global.Uint16Array;\r
+ctorByTag[uint32Tag] = global.Uint32Array;\r
+\r
+/**\r
+ * Initializes an object clone based on its `toStringTag`.\r
+ *\r
+ * **Note:** This function only supports cloning values with tags of\r
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to clone.\r
+ * @param {string} tag The `toStringTag` of the object to clone.\r
+ * @param {boolean} [isDeep] Specify a deep clone.\r
+ * @returns {Object} Returns the initialized clone.\r
+ */\r
+function initCloneByTag(object, tag, isDeep) {\r
+  var Ctor = object.constructor;\r
+  switch (tag) {\r
+    case arrayBufferTag:\r
+      return bufferClone(object);\r
+\r
+    case boolTag:\r
+    case dateTag:\r
+      return new Ctor(+object);\r
+\r
+    case float32Tag: case float64Tag:\r
+    case int8Tag: case int16Tag: case int32Tag:\r
+    case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\r
+      // Safari 5 mobile incorrectly has `Object` as the constructor of typed arrays.\r
+      if (Ctor instanceof Ctor) {\r
+        Ctor = ctorByTag[tag];\r
+      }\r
+      var buffer = object.buffer;\r
+      return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);\r
+\r
+    case numberTag:\r
+    case stringTag:\r
+      return new Ctor(object);\r
+\r
+    case regexpTag:\r
+      var result = new Ctor(object.source, reFlags.exec(object));\r
+      result.lastIndex = object.lastIndex;\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = initCloneByTag;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL2luaXRDbG9uZUJ5VGFnLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E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B0eXBlZCBhcnJheXMuXG4gICAgICBpZiAoQ3RvciBpbnN0YW5jZW9mIEN0b3IpIHtcbiAgICAgICAgQ3RvciA9IGN0b3JCeVRhZ1t0YWddO1xuICAgICAgfVxuICAgICAgdmFyIGJ1ZmZlciA9IG9iamVjdC5idWZmZXI7XG4gICAgICByZXR1cm4gbmV3IEN0b3IoaXNEZWVwID8gYnVmZmVyQ2xvbmUoYnVmZmVyKSA6IGJ1ZmZlciwgb2JqZWN0LmJ5dGVPZmZzZXQsIG9iamVjdC5sZW5ndGgpO1xuXG4gICAgY2FzZSBudW1iZXJUYWc6XG4gICAgY2FzZSBzdHJpbmdUYWc6XG4gICAgICByZXR1cm4gbmV3IEN0b3Iob2JqZWN0KTtcblxuICAgIGNhc2UgcmVnZXhwVGFnOlxuICAgICAgdmFyIHJlc3VsdCA9IG5ldyBDdG9yKG9iamVjdC5zb3VyY2UsIHJlRmxhZ3MuZXhlYyhvYmplY3QpKTtcbiAgICAgIHJlc3VsdC5sYXN0SW5kZXggPSBvYmplY3QubGFzdEluZGV4O1xuICB9XG4gIHJldHVybiByZXN1bHQ7XG59XG5cbm1vZHVsZS5leHBvcnRzID0gaW5pdENsb25lQnlUYWc7XG4iXX0=\r
+},{"./bufferClone":97}],120:[function(require,module,exports){\r
+/**\r
+ * Initializes an object clone.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to clone.\r
+ * @returns {Object} Returns the initialized clone.\r
+ */\r
+function initCloneObject(object) {\r
+  var Ctor = object.constructor;\r
+  if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {\r
+    Ctor = Object;\r
+  }\r
+  return new Ctor;\r
+}\r
+\r
+module.exports = initCloneObject;\r
+\r
+},{}],121:[function(require,module,exports){\r
+var getLength = require('./getLength'),\r
+    isLength = require('./isLength');\r
+\r
+/**\r
+ * Checks if `value` is array-like.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\r
+ */\r
+function isArrayLike(value) {\r
+  return value != null && isLength(getLength(value));\r
+}\r
+\r
+module.exports = isArrayLike;\r
+\r
+},{"./getLength":114,"./isLength":127}],122:[function(require,module,exports){\r
+/**\r
+ * Checks if `value` is a host object in IE < 9.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\r
+ */\r
+var isHostObject = (function() {\r
+  try {\r
+    Object({ 'toString': 0 } + '');\r
+  } catch(e) {\r
+    return function() { return false; };\r
+  }\r
+  return function(value) {\r
+    // IE < 9 presents many host objects as `Object` objects that can coerce\r
+    // to strings despite having improperly defined `toString` methods.\r
+    return typeof value.toString != 'function' && typeof (value + '') == 'string';\r
+  };\r
+}());\r
+\r
+module.exports = isHostObject;\r
+\r
+},{}],123:[function(require,module,exports){\r
+/** Used to detect unsigned integer values. */\r
+var reIsUint = /^\d+$/;\r
+\r
+/**\r
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\r
+ * of an array-like value.\r
+ */\r
+var MAX_SAFE_INTEGER = 9007199254740991;\r
+\r
+/**\r
+ * Checks if `value` is a valid array-like index.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\r
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\r
+ */\r
+function isIndex(value, length) {\r
+  value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;\r
+  length = length == null ? MAX_SAFE_INTEGER : length;\r
+  return value > -1 && value % 1 == 0 && value < length;\r
+}\r
+\r
+module.exports = isIndex;\r
+\r
+},{}],124:[function(require,module,exports){\r
+var isArrayLike = require('./isArrayLike'),\r
+    isIndex = require('./isIndex'),\r
+    isObject = require('../lang/isObject');\r
+\r
+/**\r
+ * Checks if the provided arguments are from an iteratee call.\r
+ *\r
+ * @private\r
+ * @param {*} value The potential iteratee value argument.\r
+ * @param {*} index The potential iteratee index or key argument.\r
+ * @param {*} object The potential iteratee object argument.\r
+ * @returns {boolean} Returns `true` if the arguments are from an iteratee call, else `false`.\r
+ */\r
+function isIterateeCall(value, index, object) {\r
+  if (!isObject(object)) {\r
+    return false;\r
+  }\r
+  var type = typeof index;\r
+  if (type == 'number'\r
+      ? (isArrayLike(object) && isIndex(index, object.length))\r
+      : (type == 'string' && index in object)) {\r
+    var other = object[index];\r
+    return value === value ? (value === other) : (other !== other);\r
+  }\r
+  return false;\r
+}\r
+\r
+module.exports = isIterateeCall;\r
+\r
+},{"../lang/isObject":146,"./isArrayLike":121,"./isIndex":123}],125:[function(require,module,exports){\r
+var isArray = require('../lang/isArray'),\r
+    toObject = require('./toObject');\r
+\r
+/** Used to match property names within property paths. */\r
+var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,\r
+    reIsPlainProp = /^\w*$/;\r
+\r
+/**\r
+ * Checks if `value` is a property name and not a property path.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @param {Object} [object] The object to query keys on.\r
+ * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\r
+ */\r
+function isKey(value, object) {\r
+  var type = typeof value;\r
+  if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {\r
+    return true;\r
+  }\r
+  if (isArray(value)) {\r
+    return false;\r
+  }\r
+  var result = !reIsDeepProp.test(value);\r
+  return result || (object != null && value in toObject(object));\r
+}\r
+\r
+module.exports = isKey;\r
+\r
+},{"../lang/isArray":142,"./toObject":137}],126:[function(require,module,exports){\r
+var LazyWrapper = require('./LazyWrapper'),\r
+    getData = require('./getData'),\r
+    getFuncName = require('./getFuncName'),\r
+    lodash = require('../chain/lodash');\r
+\r
+/**\r
+ * Checks if `func` has a lazy counterpart.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to check.\r
+ * @returns {boolean} Returns `true` if `func` has a lazy counterpart, else `false`.\r
+ */\r
+function isLaziable(func) {\r
+  var funcName = getFuncName(func),\r
+      other = lodash[funcName];\r
+\r
+  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {\r
+    return false;\r
+  }\r
+  if (func === other) {\r
+    return true;\r
+  }\r
+  var data = getData(other);\r
+  return !!data && func === data[0];\r
+}\r
+\r
+module.exports = isLaziable;\r
+\r
+},{"../chain/lodash":53,"./LazyWrapper":62,"./getData":112,"./getFuncName":113}],127:[function(require,module,exports){\r
+/**\r
+ * Used as the [maximum length](http://ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer)\r
+ * of an array-like value.\r
+ */\r
+var MAX_SAFE_INTEGER = 9007199254740991;\r
+\r
+/**\r
+ * Checks if `value` is a valid array-like length.\r
+ *\r
+ * **Note:** This function is based on [`ToLength`](http://ecma-international.org/ecma-262/6.0/#sec-tolength).\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\r
+ */\r
+function isLength(value) {\r
+  return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\r
+}\r
+\r
+module.exports = isLength;\r
+\r
+},{}],128:[function(require,module,exports){\r
+/**\r
+ * Checks if `value` is object-like.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r
+ */\r
+function isObjectLike(value) {\r
+  return !!value && typeof value == 'object';\r
+}\r
+\r
+module.exports = isObjectLike;\r
+\r
+},{}],129:[function(require,module,exports){\r
+var isObject = require('../lang/isObject');\r
+\r
+/**\r
+ * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` if suitable for strict\r
+ *  equality comparisons, else `false`.\r
+ */\r
+function isStrictComparable(value) {\r
+  return value === value && !isObject(value);\r
+}\r
+\r
+module.exports = isStrictComparable;\r
+\r
+},{"../lang/isObject":146}],130:[function(require,module,exports){\r
+var arrayCopy = require('./arrayCopy'),\r
+    composeArgs = require('./composeArgs'),\r
+    composeArgsRight = require('./composeArgsRight'),\r
+    replaceHolders = require('./replaceHolders');\r
+\r
+/** Used to compose bitmasks for wrapper metadata. */\r
+var BIND_FLAG = 1,\r
+    CURRY_BOUND_FLAG = 4,\r
+    CURRY_FLAG = 8,\r
+    ARY_FLAG = 128,\r
+    REARG_FLAG = 256;\r
+\r
+/** Used as the internal argument placeholder. */\r
+var PLACEHOLDER = '__lodash_placeholder__';\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMin = Math.min;\r
+\r
+/**\r
+ * Merges the function metadata of `source` into `data`.\r
+ *\r
+ * Merging metadata reduces the number of wrappers required to invoke a function.\r
+ * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\r
+ * may be applied regardless of execution order. Methods like `_.ary` and `_.rearg`\r
+ * augment function arguments, making the order in which they are executed important,\r
+ * preventing the merging of metadata. However, we make an exception for a safe\r
+ * common case where curried functions have `_.ary` and or `_.rearg` applied.\r
+ *\r
+ * @private\r
+ * @param {Array} data The destination metadata.\r
+ * @param {Array} source The source metadata.\r
+ * @returns {Array} Returns `data`.\r
+ */\r
+function mergeData(data, source) {\r
+  var bitmask = data[1],\r
+      srcBitmask = source[1],\r
+      newBitmask = bitmask | srcBitmask,\r
+      isCommon = newBitmask < ARY_FLAG;\r
+\r
+  var isCombo =\r
+    (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||\r
+    (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||\r
+    (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);\r
+\r
+  // Exit early if metadata can't be merged.\r
+  if (!(isCommon || isCombo)) {\r
+    return data;\r
+  }\r
+  // Use source `thisArg` if available.\r
+  if (srcBitmask & BIND_FLAG) {\r
+    data[2] = source[2];\r
+    // Set when currying a bound function.\r
+    newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;\r
+  }\r
+  // Compose partial arguments.\r
+  var value = source[3];\r
+  if (value) {\r
+    var partials = data[3];\r
+    data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);\r
+    data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);\r
+  }\r
+  // Compose partial right arguments.\r
+  value = source[5];\r
+  if (value) {\r
+    partials = data[5];\r
+    data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);\r
+    data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);\r
+  }\r
+  // Use source `argPos` if available.\r
+  value = source[7];\r
+  if (value) {\r
+    data[7] = arrayCopy(value);\r
+  }\r
+  // Use source `ary` if it's smaller.\r
+  if (srcBitmask & ARY_FLAG) {\r
+    data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\r
+  }\r
+  // Use source `arity` if one is not provided.\r
+  if (data[9] == null) {\r
+    data[9] = source[9];\r
+  }\r
+  // Use source `func` and merge bitmasks.\r
+  data[0] = source[0];\r
+  data[1] = newBitmask;\r
+\r
+  return data;\r
+}\r
+\r
+module.exports = mergeData;\r
+\r
+},{"./arrayCopy":64,"./composeArgs":98,"./composeArgsRight":99,"./replaceHolders":134}],131:[function(require,module,exports){\r
+(function (global){\r
+var getNative = require('./getNative');\r
+\r
+/** Native method references. */\r
+var WeakMap = getNative(global, 'WeakMap');\r
+\r
+/** Used to store function metadata. */\r
+var metaMap = WeakMap && new WeakMap;\r
+\r
+module.exports = metaMap;\r
+\r
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9sb2Rhc2gtY29tcGF0L2ludGVybmFsL21ldGFNYXAuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6ImdlbmVyYXRlZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJ2YXIgZ2V0TmF0aXZlID0gcmVxdWlyZSgnLi9nZXROYXRpdmUnKTtcblxuLyoqIE5hdGl2ZSBtZXRob2QgcmVmZXJlbmNlcy4gKi9cbnZhciBXZWFrTWFwID0gZ2V0TmF0aXZlKGdsb2JhbCwgJ1dlYWtNYXAnKTtcblxuLyoqIFVzZWQgdG8gc3RvcmUgZnVuY3Rpb24gbWV0YWRhdGEuICovXG52YXIgbWV0YU1hcCA9IFdlYWtNYXAgJiYgbmV3IFdlYWtNYXA7XG5cbm1vZHVsZS5leHBvcnRzID0gbWV0YU1hcDtcbiJdfQ==\r
+},{"./getNative":116}],132:[function(require,module,exports){\r
+/** Used to lookup unminified function names. */\r
+var realNames = {};\r
+\r
+module.exports = realNames;\r
+\r
+},{}],133:[function(require,module,exports){\r
+var arrayCopy = require('./arrayCopy'),\r
+    isIndex = require('./isIndex');\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeMin = Math.min;\r
+\r
+/**\r
+ * Reorder `array` according to the specified indexes where the element at\r
+ * the first index is assigned as the first element, the element at\r
+ * the second index is assigned as the second element, and so on.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to reorder.\r
+ * @param {Array} indexes The arranged array indexes.\r
+ * @returns {Array} Returns `array`.\r
+ */\r
+function reorder(array, indexes) {\r
+  var arrLength = array.length,\r
+      length = nativeMin(indexes.length, arrLength),\r
+      oldArray = arrayCopy(array);\r
+\r
+  while (length--) {\r
+    var index = indexes[length];\r
+    array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\r
+  }\r
+  return array;\r
+}\r
+\r
+module.exports = reorder;\r
+\r
+},{"./arrayCopy":64,"./isIndex":123}],134:[function(require,module,exports){\r
+/** Used as the internal argument placeholder. */\r
+var PLACEHOLDER = '__lodash_placeholder__';\r
+\r
+/**\r
+ * Replaces all `placeholder` elements in `array` with an internal placeholder\r
+ * and returns an array of their indexes.\r
+ *\r
+ * @private\r
+ * @param {Array} array The array to modify.\r
+ * @param {*} placeholder The placeholder to replace.\r
+ * @returns {Array} Returns the new array of placeholder indexes.\r
+ */\r
+function replaceHolders(array, placeholder) {\r
+  var index = -1,\r
+      length = array.length,\r
+      resIndex = -1,\r
+      result = [];\r
+\r
+  while (++index < length) {\r
+    if (array[index] === placeholder) {\r
+      array[index] = PLACEHOLDER;\r
+      result[++resIndex] = index;\r
+    }\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = replaceHolders;\r
+\r
+},{}],135:[function(require,module,exports){\r
+var baseSetData = require('./baseSetData'),\r
+    now = require('../date/now');\r
+\r
+/** Used to detect when a function becomes hot. */\r
+var HOT_COUNT = 150,\r
+    HOT_SPAN = 16;\r
+\r
+/**\r
+ * Sets metadata for `func`.\r
+ *\r
+ * **Note:** If this function becomes hot, i.e. is invoked a lot in a short\r
+ * period of time, it will trip its breaker and transition to an identity function\r
+ * to avoid garbage collection pauses in V8. See [V8 issue 2070](https://code.google.com/p/v8/issues/detail?id=2070)\r
+ * for more details.\r
+ *\r
+ * @private\r
+ * @param {Function} func The function to associate metadata with.\r
+ * @param {*} data The metadata.\r
+ * @returns {Function} Returns `func`.\r
+ */\r
+var setData = (function() {\r
+  var count = 0,\r
+      lastCalled = 0;\r
+\r
+  return function(key, value) {\r
+    var stamp = now(),\r
+        remaining = HOT_SPAN - (stamp - lastCalled);\r
+\r
+    lastCalled = stamp;\r
+    if (remaining > 0) {\r
+      if (++count >= HOT_COUNT) {\r
+        return key;\r
+      }\r
+    } else {\r
+      count = 0;\r
+    }\r
+    return baseSetData(key, value);\r
+  };\r
+}());\r
+\r
+module.exports = setData;\r
+\r
+},{"../date/now":59,"./baseSetData":90}],136:[function(require,module,exports){\r
+var isArguments = require('../lang/isArguments'),\r
+    isArray = require('../lang/isArray'),\r
+    isIndex = require('./isIndex'),\r
+    isLength = require('./isLength'),\r
+    isString = require('../lang/isString'),\r
+    keysIn = require('../object/keysIn');\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * A fallback implementation of `Object.keys` which creates an array of the\r
+ * own enumerable property names of `object`.\r
+ *\r
+ * @private\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the array of property names.\r
+ */\r
+function shimKeys(object) {\r
+  var props = keysIn(object),\r
+      propsLength = props.length,\r
+      length = propsLength && object.length;\r
+\r
+  var allowIndexes = !!length && isLength(length) &&\r
+    (isArray(object) || isArguments(object) || isString(object));\r
+\r
+  var index = -1,\r
+      result = [];\r
+\r
+  while (++index < propsLength) {\r
+    var key = props[index];\r
+    if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {\r
+      result.push(key);\r
+    }\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = shimKeys;\r
+\r
+},{"../lang/isArguments":141,"../lang/isArray":142,"../lang/isString":148,"../object/keysIn":152,"./isIndex":123,"./isLength":127}],137:[function(require,module,exports){\r
+var isObject = require('../lang/isObject'),\r
+    isString = require('../lang/isString'),\r
+    support = require('../support');\r
+\r
+/**\r
+ * Converts `value` to an object if it's not one.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to process.\r
+ * @returns {Object} Returns the object.\r
+ */\r
+function toObject(value) {\r
+  if (support.unindexedChars && isString(value)) {\r
+    var index = -1,\r
+        length = value.length,\r
+        result = Object(value);\r
+\r
+    while (++index < length) {\r
+      result[index] = value.charAt(index);\r
+    }\r
+    return result;\r
+  }\r
+  return isObject(value) ? value : Object(value);\r
+}\r
+\r
+module.exports = toObject;\r
+\r
+},{"../lang/isObject":146,"../lang/isString":148,"../support":155}],138:[function(require,module,exports){\r
+var baseToString = require('./baseToString'),\r
+    isArray = require('../lang/isArray');\r
+\r
+/** Used to match property names within property paths. */\r
+var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;\r
+\r
+/** Used to match backslashes in property paths. */\r
+var reEscapeChar = /\\(\\)?/g;\r
+\r
+/**\r
+ * Converts `value` to property path array if it's not one.\r
+ *\r
+ * @private\r
+ * @param {*} value The value to process.\r
+ * @returns {Array} Returns the property path array.\r
+ */\r
+function toPath(value) {\r
+  if (isArray(value)) {\r
+    return value;\r
+  }\r
+  var result = [];\r
+  baseToString(value).replace(rePropName, function(match, number, quote, string) {\r
+    result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\r
+  });\r
+  return result;\r
+}\r
+\r
+module.exports = toPath;\r
+\r
+},{"../lang/isArray":142,"./baseToString":92}],139:[function(require,module,exports){\r
+var LazyWrapper = require('./LazyWrapper'),\r
+    LodashWrapper = require('./LodashWrapper'),\r
+    arrayCopy = require('./arrayCopy');\r
+\r
+/**\r
+ * Creates a clone of `wrapper`.\r
+ *\r
+ * @private\r
+ * @param {Object} wrapper The wrapper to clone.\r
+ * @returns {Object} Returns the cloned wrapper.\r
+ */\r
+function wrapperClone(wrapper) {\r
+  return wrapper instanceof LazyWrapper\r
+    ? wrapper.clone()\r
+    : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));\r
+}\r
+\r
+module.exports = wrapperClone;\r
+\r
+},{"./LazyWrapper":62,"./LodashWrapper":63,"./arrayCopy":64}],140:[function(require,module,exports){\r
+var baseClone = require('../internal/baseClone'),\r
+    bindCallback = require('../internal/bindCallback');\r
+\r
+/**\r
+ * Creates a deep clone of `value`. If `customizer` is provided it's invoked\r
+ * to produce the cloned values. If `customizer` returns `undefined` cloning\r
+ * is handled by the method instead. The `customizer` is bound to `thisArg`\r
+ * and invoked with up to three argument; (value [, index|key, object]).\r
+ *\r
+ * **Note:** This method is loosely based on the\r
+ * [structured clone algorithm](http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm).\r
+ * The enumerable properties of `arguments` objects and objects created by\r
+ * constructors other than `Object` are cloned to plain `Object` objects. An\r
+ * empty object is returned for uncloneable values such as functions, DOM nodes,\r
+ * Maps, Sets, and WeakMaps.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to deep clone.\r
+ * @param {Function} [customizer] The function to customize cloning values.\r
+ * @param {*} [thisArg] The `this` binding of `customizer`.\r
+ * @returns {*} Returns the deep cloned value.\r
+ * @example\r
+ *\r
+ * var users = [\r
+ *   { 'user': 'barney' },\r
+ *   { 'user': 'fred' }\r
+ * ];\r
+ *\r
+ * var deep = _.cloneDeep(users);\r
+ * deep[0] === users[0];\r
+ * // => false\r
+ *\r
+ * // using a customizer callback\r
+ * var el = _.cloneDeep(document.body, function(value) {\r
+ *   if (_.isElement(value)) {\r
+ *     return value.cloneNode(true);\r
+ *   }\r
+ * });\r
+ *\r
+ * el === document.body\r
+ * // => false\r
+ * el.nodeName\r
+ * // => BODY\r
+ * el.childNodes.length;\r
+ * // => 20\r
+ */\r
+function cloneDeep(value, customizer, thisArg) {\r
+  return typeof customizer == 'function'\r
+    ? baseClone(value, true, bindCallback(customizer, thisArg, 3))\r
+    : baseClone(value, true);\r
+}\r
+\r
+module.exports = cloneDeep;\r
+\r
+},{"../internal/baseClone":70,"../internal/bindCallback":96}],141:[function(require,module,exports){\r
+var isArrayLike = require('../internal/isArrayLike'),\r
+    isObjectLike = require('../internal/isObjectLike');\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/** Native method references. */\r
+var propertyIsEnumerable = objectProto.propertyIsEnumerable;\r
+\r
+/**\r
+ * Checks if `value` is classified as an `arguments` object.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\r
+ * @example\r
+ *\r
+ * _.isArguments(function() { return arguments; }());\r
+ * // => true\r
+ *\r
+ * _.isArguments([1, 2, 3]);\r
+ * // => false\r
+ */\r
+function isArguments(value) {\r
+  return isObjectLike(value) && isArrayLike(value) &&\r
+    hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');\r
+}\r
+\r
+module.exports = isArguments;\r
+\r
+},{"../internal/isArrayLike":121,"../internal/isObjectLike":128}],142:[function(require,module,exports){\r
+var getNative = require('../internal/getNative'),\r
+    isLength = require('../internal/isLength'),\r
+    isObjectLike = require('../internal/isObjectLike');\r
+\r
+/** `Object#toString` result references. */\r
+var arrayTag = '[object Array]';\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeIsArray = getNative(Array, 'isArray');\r
+\r
+/**\r
+ * Checks if `value` is classified as an `Array` object.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\r
+ * @example\r
+ *\r
+ * _.isArray([1, 2, 3]);\r
+ * // => true\r
+ *\r
+ * _.isArray(function() { return arguments; }());\r
+ * // => false\r
+ */\r
+var isArray = nativeIsArray || function(value) {\r
+  return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;\r
+};\r
+\r
+module.exports = isArray;\r
+\r
+},{"../internal/getNative":116,"../internal/isLength":127,"../internal/isObjectLike":128}],143:[function(require,module,exports){\r
+var isArguments = require('./isArguments'),\r
+    isArray = require('./isArray'),\r
+    isArrayLike = require('../internal/isArrayLike'),\r
+    isFunction = require('./isFunction'),\r
+    isObjectLike = require('../internal/isObjectLike'),\r
+    isString = require('./isString'),\r
+    keys = require('../object/keys');\r
+\r
+/**\r
+ * Checks if `value` is empty. A value is considered empty unless it's an\r
+ * `arguments` object, array, string, or jQuery-like collection with a length\r
+ * greater than `0` or an object with own enumerable properties.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {Array|Object|string} value The value to inspect.\r
+ * @returns {boolean} Returns `true` if `value` is empty, else `false`.\r
+ * @example\r
+ *\r
+ * _.isEmpty(null);\r
+ * // => true\r
+ *\r
+ * _.isEmpty(true);\r
+ * // => true\r
+ *\r
+ * _.isEmpty(1);\r
+ * // => true\r
+ *\r
+ * _.isEmpty([1, 2, 3]);\r
+ * // => false\r
+ *\r
+ * _.isEmpty({ 'a': 1 });\r
+ * // => false\r
+ */\r
+function isEmpty(value) {\r
+  if (value == null) {\r
+    return true;\r
+  }\r
+  if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||\r
+      (isObjectLike(value) && isFunction(value.splice)))) {\r
+    return !value.length;\r
+  }\r
+  return !keys(value).length;\r
+}\r
+\r
+module.exports = isEmpty;\r
+\r
+},{"../internal/isArrayLike":121,"../internal/isObjectLike":128,"../object/keys":151,"./isArguments":141,"./isArray":142,"./isFunction":144,"./isString":148}],144:[function(require,module,exports){\r
+var isObject = require('./isObject');\r
+\r
+/** `Object#toString` result references. */\r
+var funcTag = '[object Function]';\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * Checks if `value` is classified as a `Function` object.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\r
+ * @example\r
+ *\r
+ * _.isFunction(_);\r
+ * // => true\r
+ *\r
+ * _.isFunction(/abc/);\r
+ * // => false\r
+ */\r
+function isFunction(value) {\r
+  // The use of `Object#toString` avoids issues with the `typeof` operator\r
+  // in older versions of Chrome and Safari which return 'function' for regexes\r
+  // and Safari 8 which returns 'object' for typed array constructors.\r
+  return isObject(value) && objToString.call(value) == funcTag;\r
+}\r
+\r
+module.exports = isFunction;\r
+\r
+},{"./isObject":146}],145:[function(require,module,exports){\r
+var isFunction = require('./isFunction'),\r
+    isHostObject = require('../internal/isHostObject'),\r
+    isObjectLike = require('../internal/isObjectLike');\r
+\r
+/** Used to detect host constructors (Safari > 5). */\r
+var reIsHostCtor = /^\[object .+?Constructor\]$/;\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to resolve the decompiled source of functions. */\r
+var fnToString = Function.prototype.toString;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/** Used to detect if a method is native. */\r
+var reIsNative = RegExp('^' +\r
+  fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')\r
+  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'\r
+);\r
+\r
+/**\r
+ * Checks if `value` is a native function.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is a native function, else `false`.\r
+ * @example\r
+ *\r
+ * _.isNative(Array.prototype.push);\r
+ * // => true\r
+ *\r
+ * _.isNative(_);\r
+ * // => false\r
+ */\r
+function isNative(value) {\r
+  if (value == null) {\r
+    return false;\r
+  }\r
+  if (isFunction(value)) {\r
+    return reIsNative.test(fnToString.call(value));\r
+  }\r
+  return isObjectLike(value) && (isHostObject(value) ? reIsNative : reIsHostCtor).test(value);\r
+}\r
+\r
+module.exports = isNative;\r
+\r
+},{"../internal/isHostObject":122,"../internal/isObjectLike":128,"./isFunction":144}],146:[function(require,module,exports){\r
+/**\r
+ * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.\r
+ * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.\r
+ * @example\r
+ *\r
+ * _.isObject({});\r
+ * // => true\r
+ *\r
+ * _.isObject([1, 2, 3]);\r
+ * // => true\r
+ *\r
+ * _.isObject(1);\r
+ * // => false\r
+ */\r
+function isObject(value) {\r
+  // Avoid a V8 JIT bug in Chrome 19-20.\r
+  // See https://code.google.com/p/v8/issues/detail?id=2291 for more details.\r
+  var type = typeof value;\r
+  return !!value && (type == 'object' || type == 'function');\r
+}\r
+\r
+module.exports = isObject;\r
+\r
+},{}],147:[function(require,module,exports){\r
+var baseForIn = require('../internal/baseForIn'),\r
+    isArguments = require('./isArguments'),\r
+    isHostObject = require('../internal/isHostObject'),\r
+    isObjectLike = require('../internal/isObjectLike'),\r
+    support = require('../support');\r
+\r
+/** `Object#toString` result references. */\r
+var objectTag = '[object Object]';\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * Checks if `value` is a plain object, that is, an object created by the\r
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.\r
+ *\r
+ * **Note:** This method assumes objects created by the `Object` constructor\r
+ * have no inherited enumerable properties.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\r
+ * @example\r
+ *\r
+ * function Foo() {\r
+ *   this.a = 1;\r
+ * }\r
+ *\r
+ * _.isPlainObject(new Foo);\r
+ * // => false\r
+ *\r
+ * _.isPlainObject([1, 2, 3]);\r
+ * // => false\r
+ *\r
+ * _.isPlainObject({ 'x': 0, 'y': 0 });\r
+ * // => true\r
+ *\r
+ * _.isPlainObject(Object.create(null));\r
+ * // => true\r
+ */\r
+function isPlainObject(value) {\r
+  var Ctor;\r
+\r
+  // Exit early for non `Object` objects.\r
+  if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isHostObject(value) && !isArguments(value)) ||\r
+      (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {\r
+    return false;\r
+  }\r
+  // IE < 9 iterates inherited properties before own properties. If the first\r
+  // iterated property is an object's own property then there are no inherited\r
+  // enumerable properties.\r
+  var result;\r
+  if (support.ownLast) {\r
+    baseForIn(value, function(subValue, key, object) {\r
+      result = hasOwnProperty.call(object, key);\r
+      return false;\r
+    });\r
+    return result !== false;\r
+  }\r
+  // In most environments an object's own properties are iterated before\r
+  // its inherited properties. If the last iterated property is an object's\r
+  // own property then there are no inherited enumerable properties.\r
+  baseForIn(value, function(subValue, key) {\r
+    result = key;\r
+  });\r
+  return result === undefined || hasOwnProperty.call(value, result);\r
+}\r
+\r
+module.exports = isPlainObject;\r
+\r
+},{"../internal/baseForIn":77,"../internal/isHostObject":122,"../internal/isObjectLike":128,"../support":155,"./isArguments":141}],148:[function(require,module,exports){\r
+var isObjectLike = require('../internal/isObjectLike');\r
+\r
+/** `Object#toString` result references. */\r
+var stringTag = '[object String]';\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * Checks if `value` is classified as a `String` primitive or object.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\r
+ * @example\r
+ *\r
+ * _.isString('abc');\r
+ * // => true\r
+ *\r
+ * _.isString(1);\r
+ * // => false\r
+ */\r
+function isString(value) {\r
+  return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);\r
+}\r
+\r
+module.exports = isString;\r
+\r
+},{"../internal/isObjectLike":128}],149:[function(require,module,exports){\r
+var isLength = require('../internal/isLength'),\r
+    isObjectLike = require('../internal/isObjectLike');\r
+\r
+/** `Object#toString` result references. */\r
+var argsTag = '[object Arguments]',\r
+    arrayTag = '[object Array]',\r
+    boolTag = '[object Boolean]',\r
+    dateTag = '[object Date]',\r
+    errorTag = '[object Error]',\r
+    funcTag = '[object Function]',\r
+    mapTag = '[object Map]',\r
+    numberTag = '[object Number]',\r
+    objectTag = '[object Object]',\r
+    regexpTag = '[object RegExp]',\r
+    setTag = '[object Set]',\r
+    stringTag = '[object String]',\r
+    weakMapTag = '[object WeakMap]';\r
+\r
+var arrayBufferTag = '[object ArrayBuffer]',\r
+    float32Tag = '[object Float32Array]',\r
+    float64Tag = '[object Float64Array]',\r
+    int8Tag = '[object Int8Array]',\r
+    int16Tag = '[object Int16Array]',\r
+    int32Tag = '[object Int32Array]',\r
+    uint8Tag = '[object Uint8Array]',\r
+    uint8ClampedTag = '[object Uint8ClampedArray]',\r
+    uint16Tag = '[object Uint16Array]',\r
+    uint32Tag = '[object Uint32Array]';\r
+\r
+/** Used to identify `toStringTag` values of typed arrays. */\r
+var typedArrayTags = {};\r
+typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\r
+typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\r
+typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\r
+typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\r
+typedArrayTags[uint32Tag] = true;\r
+typedArrayTags[argsTag] = typedArrayTags[arrayTag] =\r
+typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\r
+typedArrayTags[dateTag] = typedArrayTags[errorTag] =\r
+typedArrayTags[funcTag] = typedArrayTags[mapTag] =\r
+typedArrayTags[numberTag] = typedArrayTags[objectTag] =\r
+typedArrayTags[regexpTag] = typedArrayTags[setTag] =\r
+typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;\r
+\r
+/** Used for native method references. */\r
+var objectProto = Object.prototype;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/**\r
+ * Checks if `value` is classified as a typed array.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.\r
+ * @example\r
+ *\r
+ * _.isTypedArray(new Uint8Array);\r
+ * // => true\r
+ *\r
+ * _.isTypedArray([]);\r
+ * // => false\r
+ */\r
+function isTypedArray(value) {\r
+  return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];\r
+}\r
+\r
+module.exports = isTypedArray;\r
+\r
+},{"../internal/isLength":127,"../internal/isObjectLike":128}],150:[function(require,module,exports){\r
+/**\r
+ * Checks if `value` is `undefined`.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Lang\r
+ * @param {*} value The value to check.\r
+ * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.\r
+ * @example\r
+ *\r
+ * _.isUndefined(void 0);\r
+ * // => true\r
+ *\r
+ * _.isUndefined(null);\r
+ * // => false\r
+ */\r
+function isUndefined(value) {\r
+  return value === undefined;\r
+}\r
+\r
+module.exports = isUndefined;\r
+\r
+},{}],151:[function(require,module,exports){\r
+var getNative = require('../internal/getNative'),\r
+    isArrayLike = require('../internal/isArrayLike'),\r
+    isObject = require('../lang/isObject'),\r
+    shimKeys = require('../internal/shimKeys'),\r
+    support = require('../support');\r
+\r
+/* Native method references for those with the same name as other `lodash` methods. */\r
+var nativeKeys = getNative(Object, 'keys');\r
+\r
+/**\r
+ * Creates an array of the own enumerable property names of `object`.\r
+ *\r
+ * **Note:** Non-object values are coerced to objects. See the\r
+ * [ES spec](http://ecma-international.org/ecma-262/6.0/#sec-object.keys)\r
+ * for more details.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Object\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the array of property names.\r
+ * @example\r
+ *\r
+ * function Foo() {\r
+ *   this.a = 1;\r
+ *   this.b = 2;\r
+ * }\r
+ *\r
+ * Foo.prototype.c = 3;\r
+ *\r
+ * _.keys(new Foo);\r
+ * // => ['a', 'b'] (iteration order is not guaranteed)\r
+ *\r
+ * _.keys('hi');\r
+ * // => ['0', '1']\r
+ */\r
+var keys = !nativeKeys ? shimKeys : function(object) {\r
+  var Ctor = object == null ? undefined : object.constructor;\r
+  if ((typeof Ctor == 'function' && Ctor.prototype === object) ||\r
+      (typeof object == 'function' ? support.enumPrototypes : isArrayLike(object))) {\r
+    return shimKeys(object);\r
+  }\r
+  return isObject(object) ? nativeKeys(object) : [];\r
+};\r
+\r
+module.exports = keys;\r
+\r
+},{"../internal/getNative":116,"../internal/isArrayLike":121,"../internal/shimKeys":136,"../lang/isObject":146,"../support":155}],152:[function(require,module,exports){\r
+var arrayEach = require('../internal/arrayEach'),\r
+    isArguments = require('../lang/isArguments'),\r
+    isArray = require('../lang/isArray'),\r
+    isFunction = require('../lang/isFunction'),\r
+    isIndex = require('../internal/isIndex'),\r
+    isLength = require('../internal/isLength'),\r
+    isObject = require('../lang/isObject'),\r
+    isString = require('../lang/isString'),\r
+    support = require('../support');\r
+\r
+/** `Object#toString` result references. */\r
+var arrayTag = '[object Array]',\r
+    boolTag = '[object Boolean]',\r
+    dateTag = '[object Date]',\r
+    errorTag = '[object Error]',\r
+    funcTag = '[object Function]',\r
+    numberTag = '[object Number]',\r
+    objectTag = '[object Object]',\r
+    regexpTag = '[object RegExp]',\r
+    stringTag = '[object String]';\r
+\r
+/** Used to fix the JScript `[[DontEnum]]` bug. */\r
+var shadowProps = [\r
+  'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable',\r
+  'toLocaleString', 'toString', 'valueOf'\r
+];\r
+\r
+/** Used for native method references. */\r
+var errorProto = Error.prototype,\r
+    objectProto = Object.prototype,\r
+    stringProto = String.prototype;\r
+\r
+/** Used to check objects for own properties. */\r
+var hasOwnProperty = objectProto.hasOwnProperty;\r
+\r
+/**\r
+ * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)\r
+ * of values.\r
+ */\r
+var objToString = objectProto.toString;\r
+\r
+/** Used to avoid iterating over non-enumerable properties in IE < 9. */\r
+var nonEnumProps = {};\r
+nonEnumProps[arrayTag] = nonEnumProps[dateTag] = nonEnumProps[numberTag] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true };\r
+nonEnumProps[boolTag] = nonEnumProps[stringTag] = { 'constructor': true, 'toString': true, 'valueOf': true };\r
+nonEnumProps[errorTag] = nonEnumProps[funcTag] = nonEnumProps[regexpTag] = { 'constructor': true, 'toString': true };\r
+nonEnumProps[objectTag] = { 'constructor': true };\r
+\r
+arrayEach(shadowProps, function(key) {\r
+  for (var tag in nonEnumProps) {\r
+    if (hasOwnProperty.call(nonEnumProps, tag)) {\r
+      var props = nonEnumProps[tag];\r
+      props[key] = hasOwnProperty.call(props, key);\r
+    }\r
+  }\r
+});\r
+\r
+/**\r
+ * Creates an array of the own and inherited enumerable property names of `object`.\r
+ *\r
+ * **Note:** Non-object values are coerced to objects.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Object\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the array of property names.\r
+ * @example\r
+ *\r
+ * function Foo() {\r
+ *   this.a = 1;\r
+ *   this.b = 2;\r
+ * }\r
+ *\r
+ * Foo.prototype.c = 3;\r
+ *\r
+ * _.keysIn(new Foo);\r
+ * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\r
+ */\r
+function keysIn(object) {\r
+  if (object == null) {\r
+    return [];\r
+  }\r
+  if (!isObject(object)) {\r
+    object = Object(object);\r
+  }\r
+  var length = object.length;\r
+\r
+  length = (length && isLength(length) &&\r
+    (isArray(object) || isArguments(object) || isString(object)) && length) || 0;\r
+\r
+  var Ctor = object.constructor,\r
+      index = -1,\r
+      proto = (isFunction(Ctor) && Ctor.prototype) || objectProto,\r
+      isProto = proto === object,\r
+      result = Array(length),\r
+      skipIndexes = length > 0,\r
+      skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error),\r
+      skipProto = support.enumPrototypes && isFunction(object);\r
+\r
+  while (++index < length) {\r
+    result[index] = (index + '');\r
+  }\r
+  // lodash skips the `constructor` property when it infers it's iterating\r
+  // over a `prototype` object because IE < 9 can't set the `[[Enumerable]]`\r
+  // attribute of an existing property and the `constructor` property of a\r
+  // prototype defaults to non-enumerable.\r
+  for (var key in object) {\r
+    if (!(skipProto && key == 'prototype') &&\r
+        !(skipErrorProps && (key == 'message' || key == 'name')) &&\r
+        !(skipIndexes && isIndex(key, length)) &&\r
+        !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\r
+      result.push(key);\r
+    }\r
+  }\r
+  if (support.nonEnumShadows && object !== objectProto) {\r
+    var tag = object === stringProto ? stringTag : (object === errorProto ? errorTag : objToString.call(object)),\r
+        nonEnums = nonEnumProps[tag] || nonEnumProps[objectTag];\r
+\r
+    if (tag == objectTag) {\r
+      proto = objectProto;\r
+    }\r
+    length = shadowProps.length;\r
+    while (length--) {\r
+      key = shadowProps[length];\r
+      var nonEnum = nonEnums[key];\r
+      if (!(isProto && nonEnum) &&\r
+          (nonEnum ? hasOwnProperty.call(object, key) : object[key] !== proto[key])) {\r
+        result.push(key);\r
+      }\r
+    }\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = keysIn;\r
+\r
+},{"../internal/arrayEach":65,"../internal/isIndex":123,"../internal/isLength":127,"../lang/isArguments":141,"../lang/isArray":142,"../lang/isFunction":144,"../lang/isObject":146,"../lang/isString":148,"../support":155}],153:[function(require,module,exports){\r
+var keys = require('./keys'),\r
+    toObject = require('../internal/toObject');\r
+\r
+/**\r
+ * Creates a two dimensional array of the key-value pairs for `object`,\r
+ * e.g. `[[key1, value1], [key2, value2]]`.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Object\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the new array of key-value pairs.\r
+ * @example\r
+ *\r
+ * _.pairs({ 'barney': 36, 'fred': 40 });\r
+ * // => [['barney', 36], ['fred', 40]] (iteration order is not guaranteed)\r
+ */\r
+function pairs(object) {\r
+  object = toObject(object);\r
+\r
+  var index = -1,\r
+      props = keys(object),\r
+      length = props.length,\r
+      result = Array(length);\r
+\r
+  while (++index < length) {\r
+    var key = props[index];\r
+    result[index] = [key, object[key]];\r
+  }\r
+  return result;\r
+}\r
+\r
+module.exports = pairs;\r
+\r
+},{"../internal/toObject":137,"./keys":151}],154:[function(require,module,exports){\r
+var baseValues = require('../internal/baseValues'),\r
+    keys = require('./keys');\r
+\r
+/**\r
+ * Creates an array of the own enumerable property values of `object`.\r
+ *\r
+ * **Note:** Non-object values are coerced to objects.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Object\r
+ * @param {Object} object The object to query.\r
+ * @returns {Array} Returns the array of property values.\r
+ * @example\r
+ *\r
+ * function Foo() {\r
+ *   this.a = 1;\r
+ *   this.b = 2;\r
+ * }\r
+ *\r
+ * Foo.prototype.c = 3;\r
+ *\r
+ * _.values(new Foo);\r
+ * // => [1, 2] (iteration order is not guaranteed)\r
+ *\r
+ * _.values('hi');\r
+ * // => ['h', 'i']\r
+ */\r
+function values(object) {\r
+  return baseValues(object, keys(object));\r
+}\r
+\r
+module.exports = values;\r
+\r
+},{"../internal/baseValues":93,"./keys":151}],155:[function(require,module,exports){\r
+/** Used for native method references. */\r
+var arrayProto = Array.prototype,\r
+    errorProto = Error.prototype,\r
+    objectProto = Object.prototype;\r
+\r
+/** Native method references. */\r
+var propertyIsEnumerable = objectProto.propertyIsEnumerable,\r
+    splice = arrayProto.splice;\r
+\r
+/**\r
+ * An object environment feature flags.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @type Object\r
+ */\r
+var support = {};\r
+\r
+(function(x) {\r
+  var Ctor = function() { this.x = x; },\r
+      object = { '0': x, 'length': x },\r
+      props = [];\r
+\r
+  Ctor.prototype = { 'valueOf': x, 'y': x };\r
+  for (var key in new Ctor) { props.push(key); }\r
+\r
+  /**\r
+   * Detect if `name` or `message` properties of `Error.prototype` are\r
+   * enumerable by default (IE < 9, Safari < 5.1).\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') ||\r
+    propertyIsEnumerable.call(errorProto, 'name');\r
+\r
+  /**\r
+   * Detect if `prototype` properties are enumerable by default.\r
+   *\r
+   * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1\r
+   * (if the prototype or a property on the prototype has been set)\r
+   * incorrectly set the `[[Enumerable]]` value of a function's `prototype`\r
+   * property to `true`.\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.enumPrototypes = propertyIsEnumerable.call(Ctor, 'prototype');\r
+\r
+  /**\r
+   * Detect if properties shadowing those on `Object.prototype` are non-enumerable.\r
+   *\r
+   * In IE < 9 an object's own properties, shadowing non-enumerable ones,\r
+   * are made non-enumerable as well (a.k.a the JScript `[[DontEnum]]` bug).\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.nonEnumShadows = !/valueOf/.test(props);\r
+\r
+  /**\r
+   * Detect if own properties are iterated after inherited properties (IE < 9).\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.ownLast = props[0] != 'x';\r
+\r
+  /**\r
+   * Detect if `Array#shift` and `Array#splice` augment array-like objects\r
+   * correctly.\r
+   *\r
+   * Firefox < 10, compatibility modes of IE 8, and IE < 9 have buggy Array\r
+   * `shift()` and `splice()` functions that fail to remove the last element,\r
+   * `value[0]`, of array-like objects even though the "length" property is\r
+   * set to `0`. The `shift()` method is buggy in compatibility modes of IE 8,\r
+   * while `splice()` is buggy regardless of mode in IE < 9.\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.spliceObjects = (splice.call(object, 0, 1), !object[0]);\r
+\r
+  /**\r
+   * Detect lack of support for accessing string characters by index.\r
+   *\r
+   * IE < 8 can't access characters by index. IE 8 can only access characters\r
+   * by index on string literals, not string objects.\r
+   *\r
+   * @memberOf _.support\r
+   * @type boolean\r
+   */\r
+  support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx';\r
+}(1, 0));\r
+\r
+module.exports = support;\r
+\r
+},{}],156:[function(require,module,exports){\r
+/**\r
+ * This method returns the first argument provided to it.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Utility\r
+ * @param {*} value Any value.\r
+ * @returns {*} Returns `value`.\r
+ * @example\r
+ *\r
+ * var object = { 'user': 'fred' };\r
+ *\r
+ * _.identity(object) === object;\r
+ * // => true\r
+ */\r
+function identity(value) {\r
+  return value;\r
+}\r
+\r
+module.exports = identity;\r
+\r
+},{}],157:[function(require,module,exports){\r
+/**\r
+ * A no-operation function that returns `undefined` regardless of the\r
+ * arguments it receives.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Utility\r
+ * @example\r
+ *\r
+ * var object = { 'user': 'fred' };\r
+ *\r
+ * _.noop(object) === undefined;\r
+ * // => true\r
+ */\r
+function noop() {\r
+  // No operation performed.\r
+}\r
+\r
+module.exports = noop;\r
+\r
+},{}],158:[function(require,module,exports){\r
+var baseProperty = require('../internal/baseProperty'),\r
+    basePropertyDeep = require('../internal/basePropertyDeep'),\r
+    isKey = require('../internal/isKey');\r
+\r
+/**\r
+ * Creates a function that returns the property value at `path` on a\r
+ * given object.\r
+ *\r
+ * @static\r
+ * @memberOf _\r
+ * @category Utility\r
+ * @param {Array|string} path The path of the property to get.\r
+ * @returns {Function} Returns the new function.\r
+ * @example\r
+ *\r
+ * var objects = [\r
+ *   { 'a': { 'b': { 'c': 2 } } },\r
+ *   { 'a': { 'b': { 'c': 1 } } }\r
+ * ];\r
+ *\r
+ * _.map(objects, _.property('a.b.c'));\r
+ * // => [2, 1]\r
+ *\r
+ * _.pluck(_.sortBy(objects, _.property(['a', 'b', 'c'])), 'a.b.c');\r
+ * // => [1, 2]\r
+ */\r
+function property(path) {\r
+  return isKey(path) ? baseProperty(path) : basePropertyDeep(path);\r
+}\r
+\r
+module.exports = property;\r
+\r
+},{"../internal/baseProperty":88,"../internal/basePropertyDeep":89,"../internal/isKey":125}],159:[function(require,module,exports){\r
+(function (process){\r
+// vim:ts=4:sts=4:sw=4:\r
+/*!\r
+ *\r
+ * Copyright 2009-2012 Kris Kowal under the terms of the MIT\r
+ * license found at http://github.com/kriskowal/q/raw/master/LICENSE\r
+ *\r
+ * With parts by Tyler Close\r
+ * Copyright 2007-2009 Tyler Close under the terms of the MIT X license found\r
+ * at http://www.opensource.org/licenses/mit-license.html\r
+ * Forked at ref_send.js version: 2009-05-11\r
+ *\r
+ * With parts by Mark Miller\r
+ * Copyright (C) 2011 Google Inc.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ *\r
+ */\r
+\r
+(function (definition) {\r
+    "use strict";\r
+\r
+    // This file will function properly as a <script> tag, or a module\r
+    // using CommonJS and NodeJS or RequireJS module formats.  In\r
+    // Common/Node/RequireJS, the module exports the Q API and when\r
+    // executed as a simple <script>, it creates a Q global instead.\r
+\r
+    // Montage Require\r
+    if (typeof bootstrap === "function") {\r
+        bootstrap("promise", definition);\r
+\r
+    // CommonJS\r
+    } else if (typeof exports === "object" && typeof module === "object") {\r
+        module.exports = definition();\r
+\r
+    // RequireJS\r
+    } else if (typeof define === "function" && define.amd) {\r
+        define(definition);\r
+\r
+    // SES (Secure EcmaScript)\r
+    } else if (typeof ses !== "undefined") {\r
+        if (!ses.ok()) {\r
+            return;\r
+        } else {\r
+            ses.makeQ = definition;\r
+        }\r
+\r
+    // <script>\r
+    } else if (typeof window !== "undefined" || typeof self !== "undefined") {\r
+        // Prefer window over self for add-on scripts. Use self for\r
+        // non-windowed contexts.\r
+        var global = typeof window !== "undefined" ? window : self;\r
+\r
+        // Get the `window` object, save the previous Q global\r
+        // and initialize Q as a global.\r
+        var previousQ = global.Q;\r
+        global.Q = definition();\r
+\r
+        // Add a noConflict function so Q can be removed from the\r
+        // global namespace.\r
+        global.Q.noConflict = function () {\r
+            global.Q = previousQ;\r
+            return this;\r
+        };\r
+\r
+    } else {\r
+        throw new Error("This environment was not anticipated by Q. Please file a bug.");\r
+    }\r
+\r
+})(function () {\r
+"use strict";\r
+\r
+var hasStacks = false;\r
+try {\r
+    throw new Error();\r
+} catch (e) {\r
+    hasStacks = !!e.stack;\r
+}\r
+\r
+// All code after this point will be filtered from stack traces reported\r
+// by Q.\r
+var qStartingLine = captureLine();\r
+var qFileName;\r
+\r
+// shims\r
+\r
+// used for fallback in "allResolved"\r
+var noop = function () {};\r
+\r
+// Use the fastest possible means to execute a task in a future turn\r
+// of the event loop.\r
+var nextTick =(function () {\r
+    // linked list of tasks (single, with head node)\r
+    var head = {task: void 0, next: null};\r
+    var tail = head;\r
+    var flushing = false;\r
+    var requestTick = void 0;\r
+    var isNodeJS = false;\r
+    // queue for late tasks, used by unhandled rejection tracking\r
+    var laterQueue = [];\r
+\r
+    function flush() {\r
+        /* jshint loopfunc: true */\r
+        var task, domain;\r
+\r
+        while (head.next) {\r
+            head = head.next;\r
+            task = head.task;\r
+            head.task = void 0;\r
+            domain = head.domain;\r
+\r
+            if (domain) {\r
+                head.domain = void 0;\r
+                domain.enter();\r
+            }\r
+            runSingle(task, domain);\r
+\r
+        }\r
+        while (laterQueue.length) {\r
+            task = laterQueue.pop();\r
+            runSingle(task);\r
+        }\r
+        flushing = false;\r
+    }\r
+    // runs a single function in the async queue\r
+    function runSingle(task, domain) {\r
+        try {\r
+            task();\r
+\r
+        } catch (e) {\r
+            if (isNodeJS) {\r
+                // In node, uncaught exceptions are considered fatal errors.\r
+                // Re-throw them synchronously to interrupt flushing!\r
+\r
+                // Ensure continuation if the uncaught exception is suppressed\r
+                // listening "uncaughtException" events (as domains does).\r
+                // Continue in next event to avoid tick recursion.\r
+                if (domain) {\r
+                    domain.exit();\r
+                }\r
+                setTimeout(flush, 0);\r
+                if (domain) {\r
+                    domain.enter();\r
+                }\r
+\r
+                throw e;\r
+\r
+            } else {\r
+                // In browsers, uncaught exceptions are not fatal.\r
+                // Re-throw them asynchronously to avoid slow-downs.\r
+                setTimeout(function () {\r
+                    throw e;\r
+                }, 0);\r
+            }\r
+        }\r
+\r
+        if (domain) {\r
+            domain.exit();\r
+        }\r
+    }\r
+\r
+    nextTick = function (task) {\r
+        tail = tail.next = {\r
+            task: task,\r
+            domain: isNodeJS && process.domain,\r
+            next: null\r
+        };\r
+\r
+        if (!flushing) {\r
+            flushing = true;\r
+            requestTick();\r
+        }\r
+    };\r
+\r
+    if (typeof process === "object" &&\r
+        process.toString() === "[object process]" && process.nextTick) {\r
+        // Ensure Q is in a real Node environment, with a `process.nextTick`.\r
+        // To see through fake Node environments:\r
+        // * Mocha test runner - exposes a `process` global without a `nextTick`\r
+        // * Browserify - exposes a `process.nexTick` function that uses\r
+        //   `setTimeout`. In this case `setImmediate` is preferred because\r
+        //    it is faster. Browserify's `process.toString()` yields\r
+        //   "[object Object]", while in a real Node environment\r
+        //   `process.nextTick()` yields "[object process]".\r
+        isNodeJS = true;\r
+\r
+        requestTick = function () {\r
+            process.nextTick(flush);\r
+        };\r
+\r
+    } else if (typeof setImmediate === "function") {\r
+        // In IE10, Node.js 0.9+, or https://github.com/NobleJS/setImmediate\r
+        if (typeof window !== "undefined") {\r
+            requestTick = setImmediate.bind(window, flush);\r
+        } else {\r
+            requestTick = function () {\r
+                setImmediate(flush);\r
+            };\r
+        }\r
+\r
+    } else if (typeof MessageChannel !== "undefined") {\r
+        // modern browsers\r
+        // http://www.nonblocking.io/2011/06/windownexttick.html\r
+        var channel = new MessageChannel();\r
+        // At least Safari Version 6.0.5 (8536.30.1) intermittently cannot create\r
+        // working message ports the first time a page loads.\r
+        channel.port1.onmessage = function () {\r
+            requestTick = requestPortTick;\r
+            channel.port1.onmessage = flush;\r
+            flush();\r
+        };\r
+        var requestPortTick = function () {\r
+            // Opera requires us to provide a message payload, regardless of\r
+            // whether we use it.\r
+            channel.port2.postMessage(0);\r
+        };\r
+        requestTick = function () {\r
+            setTimeout(flush, 0);\r
+            requestPortTick();\r
+        };\r
+\r
+    } else {\r
+        // old browsers\r
+        requestTick = function () {\r
+            setTimeout(flush, 0);\r
+        };\r
+    }\r
+    // runs a task after all other tasks have been run\r
+    // this is useful for unhandled rejection tracking that needs to happen\r
+    // after all `then`d tasks have been run.\r
+    nextTick.runAfter = function (task) {\r
+        laterQueue.push(task);\r
+        if (!flushing) {\r
+            flushing = true;\r
+            requestTick();\r
+        }\r
+    };\r
+    return nextTick;\r
+})();\r
+\r
+// Attempt to make generics safe in the face of downstream\r
+// modifications.\r
+// There is no situation where this is necessary.\r
+// If you need a security guarantee, these primordials need to be\r
+// deeply frozen anyway, and if you don’t need a security guarantee,\r
+// this is just plain paranoid.\r
+// However, this **might** have the nice side-effect of reducing the size of\r
+// the minified code by reducing x.call() to merely x()\r
+// See Mark Miller’s explanation of what this does.\r
+// http://wiki.ecmascript.org/doku.php?id=conventions:safe_meta_programming\r
+var call = Function.call;\r
+function uncurryThis(f) {\r
+    return function () {\r
+        return call.apply(f, arguments);\r
+    };\r
+}\r
+// This is equivalent, but slower:\r
+// uncurryThis = Function_bind.bind(Function_bind.call);\r
+// http://jsperf.com/uncurrythis\r
+\r
+var array_slice = uncurryThis(Array.prototype.slice);\r
+\r
+var array_reduce = uncurryThis(\r
+    Array.prototype.reduce || function (callback, basis) {\r
+        var index = 0,\r
+            length = this.length;\r
+        // concerning the initial value, if one is not provided\r
+        if (arguments.length === 1) {\r
+            // seek to the first value in the array, accounting\r
+            // for the possibility that is is a sparse array\r
+            do {\r
+                if (index in this) {\r
+                    basis = this[index++];\r
+                    break;\r
+                }\r
+                if (++index >= length) {\r
+                    throw new TypeError();\r
+                }\r
+            } while (1);\r
+        }\r
+        // reduce\r
+        for (; index < length; index++) {\r
+            // account for the possibility that the array is sparse\r
+            if (index in this) {\r
+                basis = callback(basis, this[index], index);\r
+            }\r
+        }\r
+        return basis;\r
+    }\r
+);\r
+\r
+var array_indexOf = uncurryThis(\r
+    Array.prototype.indexOf || function (value) {\r
+        // not a very good shim, but good enough for our one use of it\r
+        for (var i = 0; i < this.length; i++) {\r
+            if (this[i] === value) {\r
+                return i;\r
+            }\r
+        }\r
+        return -1;\r
+    }\r
+);\r
+\r
+var array_map = uncurryThis(\r
+    Array.prototype.map || function (callback, thisp) {\r
+        var self = this;\r
+        var collect = [];\r
+        array_reduce(self, function (undefined, value, index) {\r
+            collect.push(callback.call(thisp, value, index, self));\r
+        }, void 0);\r
+        return collect;\r
+    }\r
+);\r
+\r
+var object_create = Object.create || function (prototype) {\r
+    function Type() { }\r
+    Type.prototype = prototype;\r
+    return new Type();\r
+};\r
+\r
+var object_hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\r
+\r
+var object_keys = Object.keys || function (object) {\r
+    var keys = [];\r
+    for (var key in object) {\r
+        if (object_hasOwnProperty(object, key)) {\r
+            keys.push(key);\r
+        }\r
+    }\r
+    return keys;\r
+};\r
+\r
+var object_toString = uncurryThis(Object.prototype.toString);\r
+\r
+function isObject(value) {\r
+    return value === Object(value);\r
+}\r
+\r
+// generator related shims\r
+\r
+// FIXME: Remove this function once ES6 generators are in SpiderMonkey.\r
+function isStopIteration(exception) {\r
+    return (\r
+        object_toString(exception) === "[object StopIteration]" ||\r
+        exception instanceof QReturnValue\r
+    );\r
+}\r
+\r
+// FIXME: Remove this helper and Q.return once ES6 generators are in\r
+// SpiderMonkey.\r
+var QReturnValue;\r
+if (typeof ReturnValue !== "undefined") {\r
+    QReturnValue = ReturnValue;\r
+} else {\r
+    QReturnValue = function (value) {\r
+        this.value = value;\r
+    };\r
+}\r
+\r
+// long stack traces\r
+\r
+var STACK_JUMP_SEPARATOR = "From previous event:";\r
+\r
+function makeStackTraceLong(error, promise) {\r
+    // If possible, transform the error stack trace by removing Node and Q\r
+    // cruft, then concatenating with the stack trace of `promise`. See #57.\r
+    if (hasStacks &&\r
+        promise.stack &&\r
+        typeof error === "object" &&\r
+        error !== null &&\r
+        error.stack &&\r
+        error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1\r
+    ) {\r
+        var stacks = [];\r
+        for (var p = promise; !!p; p = p.source) {\r
+            if (p.stack) {\r
+                stacks.unshift(p.stack);\r
+            }\r
+        }\r
+        stacks.unshift(error.stack);\r
+\r
+        var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n");\r
+        error.stack = filterStackString(concatedStacks);\r
+    }\r
+}\r
+\r
+function filterStackString(stackString) {\r
+    var lines = stackString.split("\n");\r
+    var desiredLines = [];\r
+    for (var i = 0; i < lines.length; ++i) {\r
+        var line = lines[i];\r
+\r
+        if (!isInternalFrame(line) && !isNodeFrame(line) && line) {\r
+            desiredLines.push(line);\r
+        }\r
+    }\r
+    return desiredLines.join("\n");\r
+}\r
+\r
+function isNodeFrame(stackLine) {\r
+    return stackLine.indexOf("(module.js:") !== -1 ||\r
+           stackLine.indexOf("(node.js:") !== -1;\r
+}\r
+\r
+function getFileNameAndLineNumber(stackLine) {\r
+    // Named functions: "at functionName (filename:lineNumber:columnNumber)"\r
+    // In IE10 function name can have spaces ("Anonymous function") O_o\r
+    var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine);\r
+    if (attempt1) {\r
+        return [attempt1[1], Number(attempt1[2])];\r
+    }\r
+\r
+    // Anonymous functions: "at filename:lineNumber:columnNumber"\r
+    var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine);\r
+    if (attempt2) {\r
+        return [attempt2[1], Number(attempt2[2])];\r
+    }\r
+\r
+    // Firefox style: "function@filename:lineNumber or @filename:lineNumber"\r
+    var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine);\r
+    if (attempt3) {\r
+        return [attempt3[1], Number(attempt3[2])];\r
+    }\r
+}\r
+\r
+function isInternalFrame(stackLine) {\r
+    var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine);\r
+\r
+    if (!fileNameAndLineNumber) {\r
+        return false;\r
+    }\r
+\r
+    var fileName = fileNameAndLineNumber[0];\r
+    var lineNumber = fileNameAndLineNumber[1];\r
+\r
+    return fileName === qFileName &&\r
+        lineNumber >= qStartingLine &&\r
+        lineNumber <= qEndingLine;\r
+}\r
+\r
+// discover own file name and line number range for filtering stack\r
+// traces\r
+function captureLine() {\r
+    if (!hasStacks) {\r
+        return;\r
+    }\r
+\r
+    try {\r
+        throw new Error();\r
+    } catch (e) {\r
+        var lines = e.stack.split("\n");\r
+        var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2];\r
+        var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine);\r
+        if (!fileNameAndLineNumber) {\r
+            return;\r
+        }\r
+\r
+        qFileName = fileNameAndLineNumber[0];\r
+        return fileNameAndLineNumber[1];\r
+    }\r
+}\r
+\r
+function deprecate(callback, name, alternative) {\r
+    return function () {\r
+        if (typeof console !== "undefined" &&\r
+            typeof console.warn === "function") {\r
+            console.warn(name + " is deprecated, use " + alternative +\r
+                         " instead.", new Error("").stack);\r
+        }\r
+        return callback.apply(callback, arguments);\r
+    };\r
+}\r
+\r
+// end of shims\r
+// beginning of real work\r
+\r
+/**\r
+ * Constructs a promise for an immediate reference, passes promises through, or\r
+ * coerces promises from different systems.\r
+ * @param value immediate reference or promise\r
+ */\r
+function Q(value) {\r
+    // If the object is already a Promise, return it directly.  This enables\r
+    // the resolve function to both be used to created references from objects,\r
+    // but to tolerably coerce non-promises to promises.\r
+    if (value instanceof Promise) {\r
+        return value;\r
+    }\r
+\r
+    // assimilate thenables\r
+    if (isPromiseAlike(value)) {\r
+        return coerce(value);\r
+    } else {\r
+        return fulfill(value);\r
+    }\r
+}\r
+Q.resolve = Q;\r
+\r
+/**\r
+ * Performs a task in a future turn of the event loop.\r
+ * @param {Function} task\r
+ */\r
+Q.nextTick = nextTick;\r
+\r
+/**\r
+ * Controls whether or not long stack traces will be on\r
+ */\r
+Q.longStackSupport = false;\r
+\r
+// enable long stacks if Q_DEBUG is set\r
+if (typeof process === "object" && process && process.env && process.env.Q_DEBUG) {\r
+    Q.longStackSupport = true;\r
+}\r
+\r
+/**\r
+ * Constructs a {promise, resolve, reject} object.\r
+ *\r
+ * `resolve` is a callback to invoke with a more resolved value for the\r
+ * promise. To fulfill the promise, invoke `resolve` with any value that is\r
+ * not a thenable. To reject the promise, invoke `resolve` with a rejected\r
+ * thenable, or invoke `reject` with the reason directly. To resolve the\r
+ * promise to another thenable, thus putting it in the same state, invoke\r
+ * `resolve` with that other thenable.\r
+ */\r
+Q.defer = defer;\r
+function defer() {\r
+    // if "messages" is an "Array", that indicates that the promise has not yet\r
+    // been resolved.  If it is "undefined", it has been resolved.  Each\r
+    // element of the messages array is itself an array of complete arguments to\r
+    // forward to the resolved promise.  We coerce the resolution value to a\r
+    // promise using the `resolve` function because it handles both fully\r
+    // non-thenable values and other thenables gracefully.\r
+    var messages = [], progressListeners = [], resolvedPromise;\r
+\r
+    var deferred = object_create(defer.prototype);\r
+    var promise = object_create(Promise.prototype);\r
+\r
+    promise.promiseDispatch = function (resolve, op, operands) {\r
+        var args = array_slice(arguments);\r
+        if (messages) {\r
+            messages.push(args);\r
+            if (op === "when" && operands[1]) { // progress operand\r
+                progressListeners.push(operands[1]);\r
+            }\r
+        } else {\r
+            Q.nextTick(function () {\r
+                resolvedPromise.promiseDispatch.apply(resolvedPromise, args);\r
+            });\r
+        }\r
+    };\r
+\r
+    // XXX deprecated\r
+    promise.valueOf = function () {\r
+        if (messages) {\r
+            return promise;\r
+        }\r
+        var nearerValue = nearer(resolvedPromise);\r
+        if (isPromise(nearerValue)) {\r
+            resolvedPromise = nearerValue; // shorten chain\r
+        }\r
+        return nearerValue;\r
+    };\r
+\r
+    promise.inspect = function () {\r
+        if (!resolvedPromise) {\r
+            return { state: "pending" };\r
+        }\r
+        return resolvedPromise.inspect();\r
+    };\r
+\r
+    if (Q.longStackSupport && hasStacks) {\r
+        try {\r
+            throw new Error();\r
+        } catch (e) {\r
+            // NOTE: don't try to use `Error.captureStackTrace` or transfer the\r
+            // accessor around; that causes memory leaks as per GH-111. Just\r
+            // reify the stack trace as a string ASAP.\r
+            //\r
+            // At the same time, cut off the first line; it's always just\r
+            // "[object Promise]\n", as per the `toString`.\r
+            promise.stack = e.stack.substring(e.stack.indexOf("\n") + 1);\r
+        }\r
+    }\r
+\r
+    // NOTE: we do the checks for `resolvedPromise` in each method, instead of\r
+    // consolidating them into `become`, since otherwise we'd create new\r
+    // promises with the lines `become(whatever(value))`. See e.g. GH-252.\r
+\r
+    function become(newPromise) {\r
+        resolvedPromise = newPromise;\r
+        promise.source = newPromise;\r
+\r
+        array_reduce(messages, function (undefined, message) {\r
+            Q.nextTick(function () {\r
+                newPromise.promiseDispatch.apply(newPromise, message);\r
+            });\r
+        }, void 0);\r
+\r
+        messages = void 0;\r
+        progressListeners = void 0;\r
+    }\r
+\r
+    deferred.promise = promise;\r
+    deferred.resolve = function (value) {\r
+        if (resolvedPromise) {\r
+            return;\r
+        }\r
+\r
+        become(Q(value));\r
+    };\r
+\r
+    deferred.fulfill = function (value) {\r
+        if (resolvedPromise) {\r
+            return;\r
+        }\r
+\r
+        become(fulfill(value));\r
+    };\r
+    deferred.reject = function (reason) {\r
+        if (resolvedPromise) {\r
+            return;\r
+        }\r
+\r
+        become(reject(reason));\r
+    };\r
+    deferred.notify = function (progress) {\r
+        if (resolvedPromise) {\r
+            return;\r
+        }\r
+\r
+        array_reduce(progressListeners, function (undefined, progressListener) {\r
+            Q.nextTick(function () {\r
+                progressListener(progress);\r
+            });\r
+        }, void 0);\r
+    };\r
+\r
+    return deferred;\r
+}\r
+\r
+/**\r
+ * Creates a Node-style callback that will resolve or reject the deferred\r
+ * promise.\r
+ * @returns a nodeback\r
+ */\r
+defer.prototype.makeNodeResolver = function () {\r
+    var self = this;\r
+    return function (error, value) {\r
+        if (error) {\r
+            self.reject(error);\r
+        } else if (arguments.length > 2) {\r
+            self.resolve(array_slice(arguments, 1));\r
+        } else {\r
+            self.resolve(value);\r
+        }\r
+    };\r
+};\r
+\r
+/**\r
+ * @param resolver {Function} a function that returns nothing and accepts\r
+ * the resolve, reject, and notify functions for a deferred.\r
+ * @returns a promise that may be resolved with the given resolve and reject\r
+ * functions, or rejected by a thrown exception in resolver\r
+ */\r
+Q.Promise = promise; // ES6\r
+Q.promise = promise;\r
+function promise(resolver) {\r
+    if (typeof resolver !== "function") {\r
+        throw new TypeError("resolver must be a function.");\r
+    }\r
+    var deferred = defer();\r
+    try {\r
+        resolver(deferred.resolve, deferred.reject, deferred.notify);\r
+    } catch (reason) {\r
+        deferred.reject(reason);\r
+    }\r
+    return deferred.promise;\r
+}\r
+\r
+promise.race = race; // ES6\r
+promise.all = all; // ES6\r
+promise.reject = reject; // ES6\r
+promise.resolve = Q; // ES6\r
+\r
+// XXX experimental.  This method is a way to denote that a local value is\r
+// serializable and should be immediately dispatched to a remote upon request,\r
+// instead of passing a reference.\r
+Q.passByCopy = function (object) {\r
+    //freeze(object);\r
+    //passByCopies.set(object, true);\r
+    return object;\r
+};\r
+\r
+Promise.prototype.passByCopy = function () {\r
+    //freeze(object);\r
+    //passByCopies.set(object, true);\r
+    return this;\r
+};\r
+\r
+/**\r
+ * If two promises eventually fulfill to the same value, promises that value,\r
+ * but otherwise rejects.\r
+ * @param x {Any*}\r
+ * @param y {Any*}\r
+ * @returns {Any*} a promise for x and y if they are the same, but a rejection\r
+ * otherwise.\r
+ *\r
+ */\r
+Q.join = function (x, y) {\r
+    return Q(x).join(y);\r
+};\r
+\r
+Promise.prototype.join = function (that) {\r
+    return Q([this, that]).spread(function (x, y) {\r
+        if (x === y) {\r
+            // TODO: "===" should be Object.is or equiv\r
+            return x;\r
+        } else {\r
+            throw new Error("Can't join: not the same: " + x + " " + y);\r
+        }\r
+    });\r
+};\r
+\r
+/**\r
+ * Returns a promise for the first of an array of promises to become settled.\r
+ * @param answers {Array[Any*]} promises to race\r
+ * @returns {Any*} the first promise to be settled\r
+ */\r
+Q.race = race;\r
+function race(answerPs) {\r
+    return promise(function (resolve, reject) {\r
+        // Switch to this once we can assume at least ES5\r
+        // answerPs.forEach(function (answerP) {\r
+        //     Q(answerP).then(resolve, reject);\r
+        // });\r
+        // Use this in the meantime\r
+        for (var i = 0, len = answerPs.length; i < len; i++) {\r
+            Q(answerPs[i]).then(resolve, reject);\r
+        }\r
+    });\r
+}\r
+\r
+Promise.prototype.race = function () {\r
+    return this.then(Q.race);\r
+};\r
+\r
+/**\r
+ * Constructs a Promise with a promise descriptor object and optional fallback\r
+ * function.  The descriptor contains methods like when(rejected), get(name),\r
+ * set(name, value), post(name, args), and delete(name), which all\r
+ * return either a value, a promise for a value, or a rejection.  The fallback\r
+ * accepts the operation name, a resolver, and any further arguments that would\r
+ * have been forwarded to the appropriate method above had a method been\r
+ * provided with the proper name.  The API makes no guarantees about the nature\r
+ * of the returned object, apart from that it is usable whereever promises are\r
+ * bought and sold.\r
+ */\r
+Q.makePromise = Promise;\r
+function Promise(descriptor, fallback, inspect) {\r
+    if (fallback === void 0) {\r
+        fallback = function (op) {\r
+            return reject(new Error(\r
+                "Promise does not support operation: " + op\r
+            ));\r
+        };\r
+    }\r
+    if (inspect === void 0) {\r
+        inspect = function () {\r
+            return {state: "unknown"};\r
+        };\r
+    }\r
+\r
+    var promise = object_create(Promise.prototype);\r
+\r
+    promise.promiseDispatch = function (resolve, op, args) {\r
+        var result;\r
+        try {\r
+            if (descriptor[op]) {\r
+                result = descriptor[op].apply(promise, args);\r
+            } else {\r
+                result = fallback.call(promise, op, args);\r
+            }\r
+        } catch (exception) {\r
+            result = reject(exception);\r
+        }\r
+        if (resolve) {\r
+            resolve(result);\r
+        }\r
+    };\r
+\r
+    promise.inspect = inspect;\r
+\r
+    // XXX deprecated `valueOf` and `exception` support\r
+    if (inspect) {\r
+        var inspected = inspect();\r
+        if (inspected.state === "rejected") {\r
+            promise.exception = inspected.reason;\r
+        }\r
+\r
+        promise.valueOf = function () {\r
+            var inspected = inspect();\r
+            if (inspected.state === "pending" ||\r
+                inspected.state === "rejected") {\r
+                return promise;\r
+            }\r
+            return inspected.value;\r
+        };\r
+    }\r
+\r
+    return promise;\r
+}\r
+\r
+Promise.prototype.toString = function () {\r
+    return "[object Promise]";\r
+};\r
+\r
+Promise.prototype.then = function (fulfilled, rejected, progressed) {\r
+    var self = this;\r
+    var deferred = defer();\r
+    var done = false;   // ensure the untrusted promise makes at most a\r
+                        // single call to one of the callbacks\r
+\r
+    function _fulfilled(value) {\r
+        try {\r
+            return typeof fulfilled === "function" ? fulfilled(value) : value;\r
+        } catch (exception) {\r
+            return reject(exception);\r
+        }\r
+    }\r
+\r
+    function _rejected(exception) {\r
+        if (typeof rejected === "function") {\r
+            makeStackTraceLong(exception, self);\r
+            try {\r
+                return rejected(exception);\r
+            } catch (newException) {\r
+                return reject(newException);\r
+            }\r
+        }\r
+        return reject(exception);\r
+    }\r
+\r
+    function _progressed(value) {\r
+        return typeof progressed === "function" ? progressed(value) : value;\r
+    }\r
+\r
+    Q.nextTick(function () {\r
+        self.promiseDispatch(function (value) {\r
+            if (done) {\r
+                return;\r
+            }\r
+            done = true;\r
+\r
+            deferred.resolve(_fulfilled(value));\r
+        }, "when", [function (exception) {\r
+            if (done) {\r
+                return;\r
+            }\r
+            done = true;\r
+\r
+            deferred.resolve(_rejected(exception));\r
+        }]);\r
+    });\r
+\r
+    // Progress propagator need to be attached in the current tick.\r
+    self.promiseDispatch(void 0, "when", [void 0, function (value) {\r
+        var newValue;\r
+        var threw = false;\r
+        try {\r
+            newValue = _progressed(value);\r
+        } catch (e) {\r
+            threw = true;\r
+            if (Q.onerror) {\r
+                Q.onerror(e);\r
+            } else {\r
+                throw e;\r
+            }\r
+        }\r
+\r
+        if (!threw) {\r
+            deferred.notify(newValue);\r
+        }\r
+    }]);\r
+\r
+    return deferred.promise;\r
+};\r
+\r
+Q.tap = function (promise, callback) {\r
+    return Q(promise).tap(callback);\r
+};\r
+\r
+/**\r
+ * Works almost like "finally", but not called for rejections.\r
+ * Original resolution value is passed through callback unaffected.\r
+ * Callback may return a promise that will be awaited for.\r
+ * @param {Function} callback\r
+ * @returns {Q.Promise}\r
+ * @example\r
+ * doSomething()\r
+ *   .then(...)\r
+ *   .tap(console.log)\r
+ *   .then(...);\r
+ */\r
+Promise.prototype.tap = function (callback) {\r
+    callback = Q(callback);\r
+\r
+    return this.then(function (value) {\r
+        return callback.fcall(value).thenResolve(value);\r
+    });\r
+};\r
+\r
+/**\r
+ * Registers an observer on a promise.\r
+ *\r
+ * Guarantees:\r
+ *\r
+ * 1. that fulfilled and rejected will be called only once.\r
+ * 2. that either the fulfilled callback or the rejected callback will be\r
+ *    called, but not both.\r
+ * 3. that fulfilled and rejected will not be called in this turn.\r
+ *\r
+ * @param value      promise or immediate reference to observe\r
+ * @param fulfilled  function to be called with the fulfilled value\r
+ * @param rejected   function to be called with the rejection exception\r
+ * @param progressed function to be called on any progress notifications\r
+ * @return promise for the return value from the invoked callback\r
+ */\r
+Q.when = when;\r
+function when(value, fulfilled, rejected, progressed) {\r
+    return Q(value).then(fulfilled, rejected, progressed);\r
+}\r
+\r
+Promise.prototype.thenResolve = function (value) {\r
+    return this.then(function () { return value; });\r
+};\r
+\r
+Q.thenResolve = function (promise, value) {\r
+    return Q(promise).thenResolve(value);\r
+};\r
+\r
+Promise.prototype.thenReject = function (reason) {\r
+    return this.then(function () { throw reason; });\r
+};\r
+\r
+Q.thenReject = function (promise, reason) {\r
+    return Q(promise).thenReject(reason);\r
+};\r
+\r
+/**\r
+ * If an object is not a promise, it is as "near" as possible.\r
+ * If a promise is rejected, it is as "near" as possible too.\r
+ * If it’s a fulfilled promise, the fulfillment value is nearer.\r
+ * If it’s a deferred promise and the deferred has been resolved, the\r
+ * resolution is "nearer".\r
+ * @param object\r
+ * @returns most resolved (nearest) form of the object\r
+ */\r
+\r
+// XXX should we re-do this?\r
+Q.nearer = nearer;\r
+function nearer(value) {\r
+    if (isPromise(value)) {\r
+        var inspected = value.inspect();\r
+        if (inspected.state === "fulfilled") {\r
+            return inspected.value;\r
+        }\r
+    }\r
+    return value;\r
+}\r
+\r
+/**\r
+ * @returns whether the given object is a promise.\r
+ * Otherwise it is a fulfilled value.\r
+ */\r
+Q.isPromise = isPromise;\r
+function isPromise(object) {\r
+    return object instanceof Promise;\r
+}\r
+\r
+Q.isPromiseAlike = isPromiseAlike;\r
+function isPromiseAlike(object) {\r
+    return isObject(object) && typeof object.then === "function";\r
+}\r
+\r
+/**\r
+ * @returns whether the given object is a pending promise, meaning not\r
+ * fulfilled or rejected.\r
+ */\r
+Q.isPending = isPending;\r
+function isPending(object) {\r
+    return isPromise(object) && object.inspect().state === "pending";\r
+}\r
+\r
+Promise.prototype.isPending = function () {\r
+    return this.inspect().state === "pending";\r
+};\r
+\r
+/**\r
+ * @returns whether the given object is a value or fulfilled\r
+ * promise.\r
+ */\r
+Q.isFulfilled = isFulfilled;\r
+function isFulfilled(object) {\r
+    return !isPromise(object) || object.inspect().state === "fulfilled";\r
+}\r
+\r
+Promise.prototype.isFulfilled = function () {\r
+    return this.inspect().state === "fulfilled";\r
+};\r
+\r
+/**\r
+ * @returns whether the given object is a rejected promise.\r
+ */\r
+Q.isRejected = isRejected;\r
+function isRejected(object) {\r
+    return isPromise(object) && object.inspect().state === "rejected";\r
+}\r
+\r
+Promise.prototype.isRejected = function () {\r
+    return this.inspect().state === "rejected";\r
+};\r
+\r
+//// BEGIN UNHANDLED REJECTION TRACKING\r
+\r
+// This promise library consumes exceptions thrown in handlers so they can be\r
+// handled by a subsequent promise.  The exceptions get added to this array when\r
+// they are created, and removed when they are handled.  Note that in ES6 or\r
+// shimmed environments, this would naturally be a `Set`.\r
+var unhandledReasons = [];\r
+var unhandledRejections = [];\r
+var reportedUnhandledRejections = [];\r
+var trackUnhandledRejections = true;\r
+\r
+function resetUnhandledRejections() {\r
+    unhandledReasons.length = 0;\r
+    unhandledRejections.length = 0;\r
+\r
+    if (!trackUnhandledRejections) {\r
+        trackUnhandledRejections = true;\r
+    }\r
+}\r
+\r
+function trackRejection(promise, reason) {\r
+    if (!trackUnhandledRejections) {\r
+        return;\r
+    }\r
+    if (typeof process === "object" && typeof process.emit === "function") {\r
+        Q.nextTick.runAfter(function () {\r
+            if (array_indexOf(unhandledRejections, promise) !== -1) {\r
+                process.emit("unhandledRejection", reason, promise);\r
+                reportedUnhandledRejections.push(promise);\r
+            }\r
+        });\r
+    }\r
+\r
+    unhandledRejections.push(promise);\r
+    if (reason && typeof reason.stack !== "undefined") {\r
+        unhandledReasons.push(reason.stack);\r
+    } else {\r
+        unhandledReasons.push("(no stack) " + reason);\r
+    }\r
+}\r
+\r
+function untrackRejection(promise) {\r
+    if (!trackUnhandledRejections) {\r
+        return;\r
+    }\r
+\r
+    var at = array_indexOf(unhandledRejections, promise);\r
+    if (at !== -1) {\r
+        if (typeof process === "object" && typeof process.emit === "function") {\r
+            Q.nextTick.runAfter(function () {\r
+                var atReport = array_indexOf(reportedUnhandledRejections, promise);\r
+                if (atReport !== -1) {\r
+                    process.emit("rejectionHandled", unhandledReasons[at], promise);\r
+                    reportedUnhandledRejections.splice(atReport, 1);\r
+                }\r
+            });\r
+        }\r
+        unhandledRejections.splice(at, 1);\r
+        unhandledReasons.splice(at, 1);\r
+    }\r
+}\r
+\r
+Q.resetUnhandledRejections = resetUnhandledRejections;\r
+\r
+Q.getUnhandledReasons = function () {\r
+    // Make a copy so that consumers can't interfere with our internal state.\r
+    return unhandledReasons.slice();\r
+};\r
+\r
+Q.stopUnhandledRejectionTracking = function () {\r
+    resetUnhandledRejections();\r
+    trackUnhandledRejections = false;\r
+};\r
+\r
+resetUnhandledRejections();\r
+\r
+//// END UNHANDLED REJECTION TRACKING\r
+\r
+/**\r
+ * Constructs a rejected promise.\r
+ * @param reason value describing the failure\r
+ */\r
+Q.reject = reject;\r
+function reject(reason) {\r
+    var rejection = Promise({\r
+        "when": function (rejected) {\r
+            // note that the error has been handled\r
+            if (rejected) {\r
+                untrackRejection(this);\r
+            }\r
+            return rejected ? rejected(reason) : this;\r
+        }\r
+    }, function fallback() {\r
+        return this;\r
+    }, function inspect() {\r
+        return { state: "rejected", reason: reason };\r
+    });\r
+\r
+    // Note that the reason has not been handled.\r
+    trackRejection(rejection, reason);\r
+\r
+    return rejection;\r
+}\r
+\r
+/**\r
+ * Constructs a fulfilled promise for an immediate reference.\r
+ * @param value immediate reference\r
+ */\r
+Q.fulfill = fulfill;\r
+function fulfill(value) {\r
+    return Promise({\r
+        "when": function () {\r
+            return value;\r
+        },\r
+        "get": function (name) {\r
+            return value[name];\r
+        },\r
+        "set": function (name, rhs) {\r
+            value[name] = rhs;\r
+        },\r
+        "delete": function (name) {\r
+            delete value[name];\r
+        },\r
+        "post": function (name, args) {\r
+            // Mark Miller proposes that post with no name should apply a\r
+            // promised function.\r
+            if (name === null || name === void 0) {\r
+                return value.apply(void 0, args);\r
+            } else {\r
+                return value[name].apply(value, args);\r
+            }\r
+        },\r
+        "apply": function (thisp, args) {\r
+            return value.apply(thisp, args);\r
+        },\r
+        "keys": function () {\r
+            return object_keys(value);\r
+        }\r
+    }, void 0, function inspect() {\r
+        return { state: "fulfilled", value: value };\r
+    });\r
+}\r
+\r
+/**\r
+ * Converts thenables to Q promises.\r
+ * @param promise thenable promise\r
+ * @returns a Q promise\r
+ */\r
+function coerce(promise) {\r
+    var deferred = defer();\r
+    Q.nextTick(function () {\r
+        try {\r
+            promise.then(deferred.resolve, deferred.reject, deferred.notify);\r
+        } catch (exception) {\r
+            deferred.reject(exception);\r
+        }\r
+    });\r
+    return deferred.promise;\r
+}\r
+\r
+/**\r
+ * Annotates an object such that it will never be\r
+ * transferred away from this process over any promise\r
+ * communication channel.\r
+ * @param object\r
+ * @returns promise a wrapping of that object that\r
+ * additionally responds to the "isDef" message\r
+ * without a rejection.\r
+ */\r
+Q.master = master;\r
+function master(object) {\r
+    return Promise({\r
+        "isDef": function () {}\r
+    }, function fallback(op, args) {\r
+        return dispatch(object, op, args);\r
+    }, function () {\r
+        return Q(object).inspect();\r
+    });\r
+}\r
+\r
+/**\r
+ * Spreads the values of a promised array of arguments into the\r
+ * fulfillment callback.\r
+ * @param fulfilled callback that receives variadic arguments from the\r
+ * promised array\r
+ * @param rejected callback that receives the exception if the promise\r
+ * is rejected.\r
+ * @returns a promise for the return value or thrown exception of\r
+ * either callback.\r
+ */\r
+Q.spread = spread;\r
+function spread(value, fulfilled, rejected) {\r
+    return Q(value).spread(fulfilled, rejected);\r
+}\r
+\r
+Promise.prototype.spread = function (fulfilled, rejected) {\r
+    return this.all().then(function (array) {\r
+        return fulfilled.apply(void 0, array);\r
+    }, rejected);\r
+};\r
+\r
+/**\r
+ * The async function is a decorator for generator functions, turning\r
+ * them into asynchronous generators.  Although generators are only part\r
+ * of the newest ECMAScript 6 drafts, this code does not cause syntax\r
+ * errors in older engines.  This code should continue to work and will\r
+ * in fact improve over time as the language improves.\r
+ *\r
+ * ES6 generators are currently part of V8 version 3.19 with the\r
+ * --harmony-generators runtime flag enabled.  SpiderMonkey has had them\r
+ * for longer, but under an older Python-inspired form.  This function\r
+ * works on both kinds of generators.\r
+ *\r
+ * Decorates a generator function such that:\r
+ *  - it may yield promises\r
+ *  - execution will continue when that promise is fulfilled\r
+ *  - the value of the yield expression will be the fulfilled value\r
+ *  - it returns a promise for the return value (when the generator\r
+ *    stops iterating)\r
+ *  - the decorated function returns a promise for the return value\r
+ *    of the generator or the first rejected promise among those\r
+ *    yielded.\r
+ *  - if an error is thrown in the generator, it propagates through\r
+ *    every following yield until it is caught, or until it escapes\r
+ *    the generator function altogether, and is translated into a\r
+ *    rejection for the promise returned by the decorated generator.\r
+ */\r
+Q.async = async;\r
+function async(makeGenerator) {\r
+    return function () {\r
+        // when verb is "send", arg is a value\r
+        // when verb is "throw", arg is an exception\r
+        function continuer(verb, arg) {\r
+            var result;\r
+\r
+            // Until V8 3.19 / Chromium 29 is released, SpiderMonkey is the only\r
+            // engine that has a deployed base of browsers that support generators.\r
+            // However, SM's generators use the Python-inspired semantics of\r
+            // outdated ES6 drafts.  We would like to support ES6, but we'd also\r
+            // like to make it possible to use generators in deployed browsers, so\r
+            // we also support Python-style generators.  At some point we can remove\r
+            // this block.\r
+\r
+            if (typeof StopIteration === "undefined") {\r
+                // ES6 Generators\r
+                try {\r
+                    result = generator[verb](arg);\r
+                } catch (exception) {\r
+                    return reject(exception);\r
+                }\r
+                if (result.done) {\r
+                    return Q(result.value);\r
+                } else {\r
+                    return when(result.value, callback, errback);\r
+                }\r
+            } else {\r
+                // SpiderMonkey Generators\r
+                // FIXME: Remove this case when SM does ES6 generators.\r
+                try {\r
+                    result = generator[verb](arg);\r
+                } catch (exception) {\r
+                    if (isStopIteration(exception)) {\r
+                        return Q(exception.value);\r
+                    } else {\r
+                        return reject(exception);\r
+                    }\r
+                }\r
+                return when(result, callback, errback);\r
+            }\r
+        }\r
+        var generator = makeGenerator.apply(this, arguments);\r
+        var callback = continuer.bind(continuer, "next");\r
+        var errback = continuer.bind(continuer, "throw");\r
+        return callback();\r
+    };\r
+}\r
+\r
+/**\r
+ * The spawn function is a small wrapper around async that immediately\r
+ * calls the generator and also ends the promise chain, so that any\r
+ * unhandled errors are thrown instead of forwarded to the error\r
+ * handler. This is useful because it's extremely common to run\r
+ * generators at the top-level to work with libraries.\r
+ */\r
+Q.spawn = spawn;\r
+function spawn(makeGenerator) {\r
+    Q.done(Q.async(makeGenerator)());\r
+}\r
+\r
+// FIXME: Remove this interface once ES6 generators are in SpiderMonkey.\r
+/**\r
+ * Throws a ReturnValue exception to stop an asynchronous generator.\r
+ *\r
+ * This interface is a stop-gap measure to support generator return\r
+ * values in older Firefox/SpiderMonkey.  In browsers that support ES6\r
+ * generators like Chromium 29, just use "return" in your generator\r
+ * functions.\r
+ *\r
+ * @param value the return value for the surrounding generator\r
+ * @throws ReturnValue exception with the value.\r
+ * @example\r
+ * // ES6 style\r
+ * Q.async(function* () {\r
+ *      var foo = yield getFooPromise();\r
+ *      var bar = yield getBarPromise();\r
+ *      return foo + bar;\r
+ * })\r
+ * // Older SpiderMonkey style\r
+ * Q.async(function () {\r
+ *      var foo = yield getFooPromise();\r
+ *      var bar = yield getBarPromise();\r
+ *      Q.return(foo + bar);\r
+ * })\r
+ */\r
+Q["return"] = _return;\r
+function _return(value) {\r
+    throw new QReturnValue(value);\r
+}\r
+\r
+/**\r
+ * The promised function decorator ensures that any promise arguments\r
+ * are settled and passed as values (`this` is also settled and passed\r
+ * as a value).  It will also ensure that the result of a function is\r
+ * always a promise.\r
+ *\r
+ * @example\r
+ * var add = Q.promised(function (a, b) {\r
+ *     return a + b;\r
+ * });\r
+ * add(Q(a), Q(B));\r
+ *\r
+ * @param {function} callback The function to decorate\r
+ * @returns {function} a function that has been decorated.\r
+ */\r
+Q.promised = promised;\r
+function promised(callback) {\r
+    return function () {\r
+        return spread([this, all(arguments)], function (self, args) {\r
+            return callback.apply(self, args);\r
+        });\r
+    };\r
+}\r
+\r
+/**\r
+ * sends a message to a value in a future turn\r
+ * @param object* the recipient\r
+ * @param op the name of the message operation, e.g., "when",\r
+ * @param args further arguments to be forwarded to the operation\r
+ * @returns result {Promise} a promise for the result of the operation\r
+ */\r
+Q.dispatch = dispatch;\r
+function dispatch(object, op, args) {\r
+    return Q(object).dispatch(op, args);\r
+}\r
+\r
+Promise.prototype.dispatch = function (op, args) {\r
+    var self = this;\r
+    var deferred = defer();\r
+    Q.nextTick(function () {\r
+        self.promiseDispatch(deferred.resolve, op, args);\r
+    });\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * Gets the value of a property in a future turn.\r
+ * @param object    promise or immediate reference for target object\r
+ * @param name      name of property to get\r
+ * @return promise for the property value\r
+ */\r
+Q.get = function (object, key) {\r
+    return Q(object).dispatch("get", [key]);\r
+};\r
+\r
+Promise.prototype.get = function (key) {\r
+    return this.dispatch("get", [key]);\r
+};\r
+\r
+/**\r
+ * Sets the value of a property in a future turn.\r
+ * @param object    promise or immediate reference for object object\r
+ * @param name      name of property to set\r
+ * @param value     new value of property\r
+ * @return promise for the return value\r
+ */\r
+Q.set = function (object, key, value) {\r
+    return Q(object).dispatch("set", [key, value]);\r
+};\r
+\r
+Promise.prototype.set = function (key, value) {\r
+    return this.dispatch("set", [key, value]);\r
+};\r
+\r
+/**\r
+ * Deletes a property in a future turn.\r
+ * @param object    promise or immediate reference for target object\r
+ * @param name      name of property to delete\r
+ * @return promise for the return value\r
+ */\r
+Q.del = // XXX legacy\r
+Q["delete"] = function (object, key) {\r
+    return Q(object).dispatch("delete", [key]);\r
+};\r
+\r
+Promise.prototype.del = // XXX legacy\r
+Promise.prototype["delete"] = function (key) {\r
+    return this.dispatch("delete", [key]);\r
+};\r
+\r
+/**\r
+ * Invokes a method in a future turn.\r
+ * @param object    promise or immediate reference for target object\r
+ * @param name      name of method to invoke\r
+ * @param value     a value to post, typically an array of\r
+ *                  invocation arguments for promises that\r
+ *                  are ultimately backed with `resolve` values,\r
+ *                  as opposed to those backed with URLs\r
+ *                  wherein the posted value can be any\r
+ *                  JSON serializable object.\r
+ * @return promise for the return value\r
+ */\r
+// bound locally because it is used by other methods\r
+Q.mapply = // XXX As proposed by "Redsandro"\r
+Q.post = function (object, name, args) {\r
+    return Q(object).dispatch("post", [name, args]);\r
+};\r
+\r
+Promise.prototype.mapply = // XXX As proposed by "Redsandro"\r
+Promise.prototype.post = function (name, args) {\r
+    return this.dispatch("post", [name, args]);\r
+};\r
+\r
+/**\r
+ * Invokes a method in a future turn.\r
+ * @param object    promise or immediate reference for target object\r
+ * @param name      name of method to invoke\r
+ * @param ...args   array of invocation arguments\r
+ * @return promise for the return value\r
+ */\r
+Q.send = // XXX Mark Miller's proposed parlance\r
+Q.mcall = // XXX As proposed by "Redsandro"\r
+Q.invoke = function (object, name /*...args*/) {\r
+    return Q(object).dispatch("post", [name, array_slice(arguments, 2)]);\r
+};\r
+\r
+Promise.prototype.send = // XXX Mark Miller's proposed parlance\r
+Promise.prototype.mcall = // XXX As proposed by "Redsandro"\r
+Promise.prototype.invoke = function (name /*...args*/) {\r
+    return this.dispatch("post", [name, array_slice(arguments, 1)]);\r
+};\r
+\r
+/**\r
+ * Applies the promised function in a future turn.\r
+ * @param object    promise or immediate reference for target function\r
+ * @param args      array of application arguments\r
+ */\r
+Q.fapply = function (object, args) {\r
+    return Q(object).dispatch("apply", [void 0, args]);\r
+};\r
+\r
+Promise.prototype.fapply = function (args) {\r
+    return this.dispatch("apply", [void 0, args]);\r
+};\r
+\r
+/**\r
+ * Calls the promised function in a future turn.\r
+ * @param object    promise or immediate reference for target function\r
+ * @param ...args   array of application arguments\r
+ */\r
+Q["try"] =\r
+Q.fcall = function (object /* ...args*/) {\r
+    return Q(object).dispatch("apply", [void 0, array_slice(arguments, 1)]);\r
+};\r
+\r
+Promise.prototype.fcall = function (/*...args*/) {\r
+    return this.dispatch("apply", [void 0, array_slice(arguments)]);\r
+};\r
+\r
+/**\r
+ * Binds the promised function, transforming return values into a fulfilled\r
+ * promise and thrown errors into a rejected one.\r
+ * @param object    promise or immediate reference for target function\r
+ * @param ...args   array of application arguments\r
+ */\r
+Q.fbind = function (object /*...args*/) {\r
+    var promise = Q(object);\r
+    var args = array_slice(arguments, 1);\r
+    return function fbound() {\r
+        return promise.dispatch("apply", [\r
+            this,\r
+            args.concat(array_slice(arguments))\r
+        ]);\r
+    };\r
+};\r
+Promise.prototype.fbind = function (/*...args*/) {\r
+    var promise = this;\r
+    var args = array_slice(arguments);\r
+    return function fbound() {\r
+        return promise.dispatch("apply", [\r
+            this,\r
+            args.concat(array_slice(arguments))\r
+        ]);\r
+    };\r
+};\r
+\r
+/**\r
+ * Requests the names of the owned properties of a promised\r
+ * object in a future turn.\r
+ * @param object    promise or immediate reference for target object\r
+ * @return promise for the keys of the eventually settled object\r
+ */\r
+Q.keys = function (object) {\r
+    return Q(object).dispatch("keys", []);\r
+};\r
+\r
+Promise.prototype.keys = function () {\r
+    return this.dispatch("keys", []);\r
+};\r
+\r
+/**\r
+ * Turns an array of promises into a promise for an array.  If any of\r
+ * the promises gets rejected, the whole array is rejected immediately.\r
+ * @param {Array*} an array (or promise for an array) of values (or\r
+ * promises for values)\r
+ * @returns a promise for an array of the corresponding values\r
+ */\r
+// By Mark Miller\r
+// http://wiki.ecmascript.org/doku.php?id=strawman:concurrency&rev=1308776521#allfulfilled\r
+Q.all = all;\r
+function all(promises) {\r
+    return when(promises, function (promises) {\r
+        var pendingCount = 0;\r
+        var deferred = defer();\r
+        array_reduce(promises, function (undefined, promise, index) {\r
+            var snapshot;\r
+            if (\r
+                isPromise(promise) &&\r
+                (snapshot = promise.inspect()).state === "fulfilled"\r
+            ) {\r
+                promises[index] = snapshot.value;\r
+            } else {\r
+                ++pendingCount;\r
+                when(\r
+                    promise,\r
+                    function (value) {\r
+                        promises[index] = value;\r
+                        if (--pendingCount === 0) {\r
+                            deferred.resolve(promises);\r
+                        }\r
+                    },\r
+                    deferred.reject,\r
+                    function (progress) {\r
+                        deferred.notify({ index: index, value: progress });\r
+                    }\r
+                );\r
+            }\r
+        }, void 0);\r
+        if (pendingCount === 0) {\r
+            deferred.resolve(promises);\r
+        }\r
+        return deferred.promise;\r
+    });\r
+}\r
+\r
+Promise.prototype.all = function () {\r
+    return all(this);\r
+};\r
+\r
+/**\r
+ * Returns the first resolved promise of an array. Prior rejected promises are\r
+ * ignored.  Rejects only if all promises are rejected.\r
+ * @param {Array*} an array containing values or promises for values\r
+ * @returns a promise fulfilled with the value of the first resolved promise,\r
+ * or a rejected promise if all promises are rejected.\r
+ */\r
+Q.any = any;\r
+\r
+function any(promises) {\r
+    if (promises.length === 0) {\r
+        return Q.resolve();\r
+    }\r
+\r
+    var deferred = Q.defer();\r
+    var pendingCount = 0;\r
+    array_reduce(promises, function (prev, current, index) {\r
+        var promise = promises[index];\r
+\r
+        pendingCount++;\r
+\r
+        when(promise, onFulfilled, onRejected, onProgress);\r
+        function onFulfilled(result) {\r
+            deferred.resolve(result);\r
+        }\r
+        function onRejected() {\r
+            pendingCount--;\r
+            if (pendingCount === 0) {\r
+                deferred.reject(new Error(\r
+                    "Can't get fulfillment value from any promise, all " +\r
+                    "promises were rejected."\r
+                ));\r
+            }\r
+        }\r
+        function onProgress(progress) {\r
+            deferred.notify({\r
+                index: index,\r
+                value: progress\r
+            });\r
+        }\r
+    }, undefined);\r
+\r
+    return deferred.promise;\r
+}\r
+\r
+Promise.prototype.any = function () {\r
+    return any(this);\r
+};\r
+\r
+/**\r
+ * Waits for all promises to be settled, either fulfilled or\r
+ * rejected.  This is distinct from `all` since that would stop\r
+ * waiting at the first rejection.  The promise returned by\r
+ * `allResolved` will never be rejected.\r
+ * @param promises a promise for an array (or an array) of promises\r
+ * (or values)\r
+ * @return a promise for an array of promises\r
+ */\r
+Q.allResolved = deprecate(allResolved, "allResolved", "allSettled");\r
+function allResolved(promises) {\r
+    return when(promises, function (promises) {\r
+        promises = array_map(promises, Q);\r
+        return when(all(array_map(promises, function (promise) {\r
+            return when(promise, noop, noop);\r
+        })), function () {\r
+            return promises;\r
+        });\r
+    });\r
+}\r
+\r
+Promise.prototype.allResolved = function () {\r
+    return allResolved(this);\r
+};\r
+\r
+/**\r
+ * @see Promise#allSettled\r
+ */\r
+Q.allSettled = allSettled;\r
+function allSettled(promises) {\r
+    return Q(promises).allSettled();\r
+}\r
+\r
+/**\r
+ * Turns an array of promises into a promise for an array of their states (as\r
+ * returned by `inspect`) when they have all settled.\r
+ * @param {Array[Any*]} values an array (or promise for an array) of values (or\r
+ * promises for values)\r
+ * @returns {Array[State]} an array of states for the respective values.\r
+ */\r
+Promise.prototype.allSettled = function () {\r
+    return this.then(function (promises) {\r
+        return all(array_map(promises, function (promise) {\r
+            promise = Q(promise);\r
+            function regardless() {\r
+                return promise.inspect();\r
+            }\r
+            return promise.then(regardless, regardless);\r
+        }));\r
+    });\r
+};\r
+\r
+/**\r
+ * Captures the failure of a promise, giving an oportunity to recover\r
+ * with a callback.  If the given promise is fulfilled, the returned\r
+ * promise is fulfilled.\r
+ * @param {Any*} promise for something\r
+ * @param {Function} callback to fulfill the returned promise if the\r
+ * given promise is rejected\r
+ * @returns a promise for the return value of the callback\r
+ */\r
+Q.fail = // XXX legacy\r
+Q["catch"] = function (object, rejected) {\r
+    return Q(object).then(void 0, rejected);\r
+};\r
+\r
+Promise.prototype.fail = // XXX legacy\r
+Promise.prototype["catch"] = function (rejected) {\r
+    return this.then(void 0, rejected);\r
+};\r
+\r
+/**\r
+ * Attaches a listener that can respond to progress notifications from a\r
+ * promise's originating deferred. This listener receives the exact arguments\r
+ * passed to ``deferred.notify``.\r
+ * @param {Any*} promise for something\r
+ * @param {Function} callback to receive any progress notifications\r
+ * @returns the given promise, unchanged\r
+ */\r
+Q.progress = progress;\r
+function progress(object, progressed) {\r
+    return Q(object).then(void 0, void 0, progressed);\r
+}\r
+\r
+Promise.prototype.progress = function (progressed) {\r
+    return this.then(void 0, void 0, progressed);\r
+};\r
+\r
+/**\r
+ * Provides an opportunity to observe the settling of a promise,\r
+ * regardless of whether the promise is fulfilled or rejected.  Forwards\r
+ * the resolution to the returned promise when the callback is done.\r
+ * The callback can return a promise to defer completion.\r
+ * @param {Any*} promise\r
+ * @param {Function} callback to observe the resolution of the given\r
+ * promise, takes no arguments.\r
+ * @returns a promise for the resolution of the given promise when\r
+ * ``fin`` is done.\r
+ */\r
+Q.fin = // XXX legacy\r
+Q["finally"] = function (object, callback) {\r
+    return Q(object)["finally"](callback);\r
+};\r
+\r
+Promise.prototype.fin = // XXX legacy\r
+Promise.prototype["finally"] = function (callback) {\r
+    callback = Q(callback);\r
+    return this.then(function (value) {\r
+        return callback.fcall().then(function () {\r
+            return value;\r
+        });\r
+    }, function (reason) {\r
+        // TODO attempt to recycle the rejection with "this".\r
+        return callback.fcall().then(function () {\r
+            throw reason;\r
+        });\r
+    });\r
+};\r
+\r
+/**\r
+ * Terminates a chain of promises, forcing rejections to be\r
+ * thrown as exceptions.\r
+ * @param {Any*} promise at the end of a chain of promises\r
+ * @returns nothing\r
+ */\r
+Q.done = function (object, fulfilled, rejected, progress) {\r
+    return Q(object).done(fulfilled, rejected, progress);\r
+};\r
+\r
+Promise.prototype.done = function (fulfilled, rejected, progress) {\r
+    var onUnhandledError = function (error) {\r
+        // forward to a future turn so that ``when``\r
+        // does not catch it and turn it into a rejection.\r
+        Q.nextTick(function () {\r
+            makeStackTraceLong(error, promise);\r
+            if (Q.onerror) {\r
+                Q.onerror(error);\r
+            } else {\r
+                throw error;\r
+            }\r
+        });\r
+    };\r
+\r
+    // Avoid unnecessary `nextTick`ing via an unnecessary `when`.\r
+    var promise = fulfilled || rejected || progress ?\r
+        this.then(fulfilled, rejected, progress) :\r
+        this;\r
+\r
+    if (typeof process === "object" && process && process.domain) {\r
+        onUnhandledError = process.domain.bind(onUnhandledError);\r
+    }\r
+\r
+    promise.then(void 0, onUnhandledError);\r
+};\r
+\r
+/**\r
+ * Causes a promise to be rejected if it does not get fulfilled before\r
+ * some milliseconds time out.\r
+ * @param {Any*} promise\r
+ * @param {Number} milliseconds timeout\r
+ * @param {Any*} custom error message or Error object (optional)\r
+ * @returns a promise for the resolution of the given promise if it is\r
+ * fulfilled before the timeout, otherwise rejected.\r
+ */\r
+Q.timeout = function (object, ms, error) {\r
+    return Q(object).timeout(ms, error);\r
+};\r
+\r
+Promise.prototype.timeout = function (ms, error) {\r
+    var deferred = defer();\r
+    var timeoutId = setTimeout(function () {\r
+        if (!error || "string" === typeof error) {\r
+            error = new Error(error || "Timed out after " + ms + " ms");\r
+            error.code = "ETIMEDOUT";\r
+        }\r
+        deferred.reject(error);\r
+    }, ms);\r
+\r
+    this.then(function (value) {\r
+        clearTimeout(timeoutId);\r
+        deferred.resolve(value);\r
+    }, function (exception) {\r
+        clearTimeout(timeoutId);\r
+        deferred.reject(exception);\r
+    }, deferred.notify);\r
+\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * Returns a promise for the given value (or promised value), some\r
+ * milliseconds after it resolved. Passes rejections immediately.\r
+ * @param {Any*} promise\r
+ * @param {Number} milliseconds\r
+ * @returns a promise for the resolution of the given promise after milliseconds\r
+ * time has elapsed since the resolution of the given promise.\r
+ * If the given promise rejects, that is passed immediately.\r
+ */\r
+Q.delay = function (object, timeout) {\r
+    if (timeout === void 0) {\r
+        timeout = object;\r
+        object = void 0;\r
+    }\r
+    return Q(object).delay(timeout);\r
+};\r
+\r
+Promise.prototype.delay = function (timeout) {\r
+    return this.then(function (value) {\r
+        var deferred = defer();\r
+        setTimeout(function () {\r
+            deferred.resolve(value);\r
+        }, timeout);\r
+        return deferred.promise;\r
+    });\r
+};\r
+\r
+/**\r
+ * Passes a continuation to a Node function, which is called with the given\r
+ * arguments provided as an array, and returns a promise.\r
+ *\r
+ *      Q.nfapply(FS.readFile, [__filename])\r
+ *      .then(function (content) {\r
+ *      })\r
+ *\r
+ */\r
+Q.nfapply = function (callback, args) {\r
+    return Q(callback).nfapply(args);\r
+};\r
+\r
+Promise.prototype.nfapply = function (args) {\r
+    var deferred = defer();\r
+    var nodeArgs = array_slice(args);\r
+    nodeArgs.push(deferred.makeNodeResolver());\r
+    this.fapply(nodeArgs).fail(deferred.reject);\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * Passes a continuation to a Node function, which is called with the given\r
+ * arguments provided individually, and returns a promise.\r
+ * @example\r
+ * Q.nfcall(FS.readFile, __filename)\r
+ * .then(function (content) {\r
+ * })\r
+ *\r
+ */\r
+Q.nfcall = function (callback /*...args*/) {\r
+    var args = array_slice(arguments, 1);\r
+    return Q(callback).nfapply(args);\r
+};\r
+\r
+Promise.prototype.nfcall = function (/*...args*/) {\r
+    var nodeArgs = array_slice(arguments);\r
+    var deferred = defer();\r
+    nodeArgs.push(deferred.makeNodeResolver());\r
+    this.fapply(nodeArgs).fail(deferred.reject);\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * Wraps a NodeJS continuation passing function and returns an equivalent\r
+ * version that returns a promise.\r
+ * @example\r
+ * Q.nfbind(FS.readFile, __filename)("utf-8")\r
+ * .then(console.log)\r
+ * .done()\r
+ */\r
+Q.nfbind =\r
+Q.denodeify = function (callback /*...args*/) {\r
+    var baseArgs = array_slice(arguments, 1);\r
+    return function () {\r
+        var nodeArgs = baseArgs.concat(array_slice(arguments));\r
+        var deferred = defer();\r
+        nodeArgs.push(deferred.makeNodeResolver());\r
+        Q(callback).fapply(nodeArgs).fail(deferred.reject);\r
+        return deferred.promise;\r
+    };\r
+};\r
+\r
+Promise.prototype.nfbind =\r
+Promise.prototype.denodeify = function (/*...args*/) {\r
+    var args = array_slice(arguments);\r
+    args.unshift(this);\r
+    return Q.denodeify.apply(void 0, args);\r
+};\r
+\r
+Q.nbind = function (callback, thisp /*...args*/) {\r
+    var baseArgs = array_slice(arguments, 2);\r
+    return function () {\r
+        var nodeArgs = baseArgs.concat(array_slice(arguments));\r
+        var deferred = defer();\r
+        nodeArgs.push(deferred.makeNodeResolver());\r
+        function bound() {\r
+            return callback.apply(thisp, arguments);\r
+        }\r
+        Q(bound).fapply(nodeArgs).fail(deferred.reject);\r
+        return deferred.promise;\r
+    };\r
+};\r
+\r
+Promise.prototype.nbind = function (/*thisp, ...args*/) {\r
+    var args = array_slice(arguments, 0);\r
+    args.unshift(this);\r
+    return Q.nbind.apply(void 0, args);\r
+};\r
+\r
+/**\r
+ * Calls a method of a Node-style object that accepts a Node-style\r
+ * callback with a given array of arguments, plus a provided callback.\r
+ * @param object an object that has the named method\r
+ * @param {String} name name of the method of object\r
+ * @param {Array} args arguments to pass to the method; the callback\r
+ * will be provided by Q and appended to these arguments.\r
+ * @returns a promise for the value or error\r
+ */\r
+Q.nmapply = // XXX As proposed by "Redsandro"\r
+Q.npost = function (object, name, args) {\r
+    return Q(object).npost(name, args);\r
+};\r
+\r
+Promise.prototype.nmapply = // XXX As proposed by "Redsandro"\r
+Promise.prototype.npost = function (name, args) {\r
+    var nodeArgs = array_slice(args || []);\r
+    var deferred = defer();\r
+    nodeArgs.push(deferred.makeNodeResolver());\r
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * Calls a method of a Node-style object that accepts a Node-style\r
+ * callback, forwarding the given variadic arguments, plus a provided\r
+ * callback argument.\r
+ * @param object an object that has the named method\r
+ * @param {String} name name of the method of object\r
+ * @param ...args arguments to pass to the method; the callback will\r
+ * be provided by Q and appended to these arguments.\r
+ * @returns a promise for the value or error\r
+ */\r
+Q.nsend = // XXX Based on Mark Miller's proposed "send"\r
+Q.nmcall = // XXX Based on "Redsandro's" proposal\r
+Q.ninvoke = function (object, name /*...args*/) {\r
+    var nodeArgs = array_slice(arguments, 2);\r
+    var deferred = defer();\r
+    nodeArgs.push(deferred.makeNodeResolver());\r
+    Q(object).dispatch("post", [name, nodeArgs]).fail(deferred.reject);\r
+    return deferred.promise;\r
+};\r
+\r
+Promise.prototype.nsend = // XXX Based on Mark Miller's proposed "send"\r
+Promise.prototype.nmcall = // XXX Based on "Redsandro's" proposal\r
+Promise.prototype.ninvoke = function (name /*...args*/) {\r
+    var nodeArgs = array_slice(arguments, 1);\r
+    var deferred = defer();\r
+    nodeArgs.push(deferred.makeNodeResolver());\r
+    this.dispatch("post", [name, nodeArgs]).fail(deferred.reject);\r
+    return deferred.promise;\r
+};\r
+\r
+/**\r
+ * If a function would like to support both Node continuation-passing-style and\r
+ * promise-returning-style, it can end its internal promise chain with\r
+ * `nodeify(nodeback)`, forwarding the optional nodeback argument.  If the user\r
+ * elects to use a nodeback, the result will be sent there.  If they do not\r
+ * pass a nodeback, they will receive the result promise.\r
+ * @param object a result (or a promise for a result)\r
+ * @param {Function} nodeback a Node.js-style callback\r
+ * @returns either the promise or nothing\r
+ */\r
+Q.nodeify = nodeify;\r
+function nodeify(object, nodeback) {\r
+    return Q(object).nodeify(nodeback);\r
+}\r
+\r
+Promise.prototype.nodeify = function (nodeback) {\r
+    if (nodeback) {\r
+        this.then(function (value) {\r
+            Q.nextTick(function () {\r
+                nodeback(null, value);\r
+            });\r
+        }, function (error) {\r
+            Q.nextTick(function () {\r
+                nodeback(error);\r
+            });\r
+        });\r
+    } else {\r
+        return this;\r
+    }\r
+};\r
+\r
+Q.noConflict = function() {\r
+    throw new Error("Q.noConflict only works when Q is used as a global");\r
+};\r
+\r
+// All code before this point will be filtered from stack traces.\r
+var qEndingLine = captureLine();\r
+\r
+return Q;\r
+\r
+});\r
+\r
+}).call(this,require('_process'))\r
+//# sourceMappingURL=data:application/json;charset:utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9xL3EuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0F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GNoIChlKSB7XG4gICAgICAgICAgICBpZiAoaXNOb2RlSlMpIHtcbiAgICAgICAgICAgICAgICAvLyBJbiBub2RlLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBjb25zaWRlcmVkIGZhdGFsIGVycm9ycy5cbiAgICAgICAgICAgICAgICAvLyBSZS10aHJvdyB0aGVtIHN5bmNocm9ub3VzbHkgdG8gaW50ZXJydXB0IGZsdXNoaW5nIVxuXG4gICAgICAgICAgICAgICAgLy8gRW5zdXJlIGNvbnRpbnVhdGlvbiBpZiB0aGUgdW5jYXVnaHQgZXhjZXB0aW9uIGlzIHN1cHByZXNzZWRcbiAgICAgICAgICAgICAgICAvLyBsaXN0ZW5pbmcgXCJ1bmNhdWdodEV4Y2VwdGlvblwiIGV2ZW50cyAoYXMgZG9tYWlucyBkb2VzKS5cbiAgICAgICAgICAgICAgICAvLyBDb250aW51ZSBpbiBuZXh0IGV2ZW50IHRvIGF2b2lkIHRpY2sgcmVjdXJzaW9uLlxuICAgICAgICAgICAgICAgIGlmIChkb21haW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmbHVzaCwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4uZW50ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aHJvdyBlO1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEluIGJyb3dzZXJzLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBub3QgZmF0YWwuXG4gICAgICAgICAgICAgICAgLy8gUmUtdGhyb3cgdGhlbSBhc3luY2hyb25vdXNseSB0byBhdm9pZCBzbG93LWRvd25zLlxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICA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ICAgICAvLyBzZWVrIHRvIHRoZSBmaXJzdCB2YWx1ZSBpbiB0aGUgYXJyYXksIGFjY291bnRpbmdcbiAgICAgICAgICAgIC8vIGZvciB0aGUgcG9zc2liaWxpdHkgdGhhdCBpcyBpcyBhIHNwYXJzZSBhcnJheVxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCBpbiB0aGlzKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2lzID0gdGhpc1tpbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgrK2luZGV4ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoMSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gcmVkdWNlXG4gICAgICAgIGZvciAoOyBpbmRleCA8IGxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICAgICAgLy8gYWNjb3VudCBmb3IgdGhlIHBvc3NpYmlsaXR5IHRoYXQgdGhlIGFycmF5IGlzIHNwYXJzZVxuICAgICAgICAgICAgaWYgKGluZGV4IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICBiYXNpcyA9IGNhbGxiYWNrKGJhc2lzLCB0aGlzW2luZGV4XSwgaW5kZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBiYXNpcztcbiAgICB9XG4pO1xuXG52YXIgYXJyYXlfaW5kZXhPZiA9IHVuY3VycnlUaGlzKFxuICAgIEFycmF5LnByb3RvdHlwZS5pbmRleE9mIHx8IGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAvLyBub3QgYSB2ZXJ5IGdvb2Qgc2hpbSwgYnV0IGdvb2QgZW5vdWdoIGZvciBvdXIgb25lIHVzZSBvZiBpdFxuICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IHRoaXMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgIGlmICh0aGlzW2ldID09PSB2YWx1ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiAtMTtcbiAgICB9XG4pO1xuXG52YXIgYXJyYXlfbWFwID0gdW5jdXJyeVRoaXMoXG4gICAgQXJyYXkucHJvdG90eXBlLm1hcCB8fCBmdW5jdGlvbiAoY2FsbGJhY2ssIHRoaXNwKSB7XG4gICAgICAgIHZhciBzZWxmID0gdGhpcztcbiAgICAgICAgdmFyIGNvbGxlY3QgPSBbXTtcbiAgICAgICAgYXJyYXlfcmVkdWNlKHNlbGYsIGZ1bmN0aW9uICh1bmRlZmluZWQsIHZhbHVlLCBpbmRleCkge1xuICAgICAgICAgICAgY29sbGVjdC5wdXNoKGNhbGxiYWNrLmNhbGwodGhpc3AsIHZhbHVlLCBpbmRleCwgc2VsZikpO1xuICAgICAgICB9LCB2b2lkIDApO1xuICAgICAgICByZXR1cm4gY29sbGVjdDtcbiAgICB9XG4pO1xuXG52YXIgb2JqZWN0X2NyZWF0ZSA9IE9iamVjdC5jcmVhdGUgfHwgZnVuY3Rpb24gKHByb3RvdHlwZSkge1xuICAgIGZ1bmN0aW9uIFR5cGUoKSB7IH1cbiAgICBUeXBlLnByb3RvdHlwZSA9IHByb3RvdHlwZTtcbiAgICByZXR1cm4gbmV3IFR5cGUoKTtcbn07XG5cbnZhciBvYmplY3RfaGFzT3duUHJvcGVydHkgPSB1bmN1cnJ5VGhpcyhPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5KTtcblxudmFyIG9iamVjdF9rZXlzID0gT2JqZWN0LmtleXMgfHwgZnVuY3Rpb24gKG9iamVjdCkge1xuICAgIHZhciBrZXlzID0gW107XG4gICAgZm9yICh2YXIga2V5IGluIG9iamVjdCkge1xuICAgICAgICBpZi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O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBmYWxsYmFjay5jYWxsKHByb21pc2UsIG9wLCBhcmdzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICByZXN1bHQgPSByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAocmVzb2x2ZSkge1xuICAgICAgICAgICAgcmVzb2x2ZShyZXN1bHQpO1xuICAgICAgICB9XG4gICAgfTtcblxuICAgIHByb21pc2UuaW5zcGVjdCA9IGluc3BlY3Q7XG5cbiAgICAvLyBYWFggZGVwcmVjYXRlZCBgdmFsdWVPZmAgYW5kIGBleGNlcHRpb25gIHN1cHBvcnRcbiAgICBpZiAoaW5zcGVjdCkge1xuICAgICAgICB2YXIgaW5zcGVjdGVkID0gaW5zcGVjdCgpO1xuICAgICAgICBpZiAoaW5zcGVjdGVkLnN0YXRlID09PSBcInJlamVjdGVkXCIpIHtcbiAgICAgICAgICAgIHByb21pc2UuZXhjZXB0aW9uID0gaW5zcGVjdGVkLnJlYXNvbjtcbiAgICAgICAgfVxuXG4gICAgICAgIHByb21pc2UudmFsdWVPZiA9IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIHZhciBpbnNwZWN0ZWQgPSBpbnNwZWN0KCk7XG4gICAgICAgICAgICBpZiAoaW5zcGVjdGVkLnN0YXRlID09PSBcInBlbmRpbmdcIiB8fFxuICAgICAgICAgICAgICAgIGluc3BlY3RlZC5zdGF0ZSA9PT0gXCJyZWplY3RlZFwiKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHByb21pc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaW5zcGVjdGVkLnZhbHVlO1xuICAgICAgICB9O1xuICAgIH1cblxuICAgIHJldHVybiBwcm9taXNlO1xufVxuXG5Qcm9taXNlLnByb3RvdHlwZS50b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xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBfcHJvZ3Jlc3NlZCh2YWx1ZSkge1xuICAgICAgICByZXR1cm4gdHlwZW9mIHByb2dyZXNzZWQgPT09IFwiZnVuY3Rpb25cIiA/IHByb2dyZXNzZWQodmFsdWUpIDogdmFsdWU7XG4gICAgfVxuXG4gICAgUS5uZXh0VGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfZnVsZmlsbGVkKHZhbHVlKSk7XG4gICAgICAgIH0sIFwid2hlblwiLCBbZnVuY3Rpb24gKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfcmVqZWN0ZWQoZXhjZXB0aW9uKSk7XG4gICAgICAgIH1dKTtcbiAgICB9KTtcblxuICAgIC8vIFByb2dyZXNzIHByb3BhZ2F0b3IgbmVlZCB0byBiZSBhdHRhY2hlZCBpbiB0aGUgY3VycmVudCB0aWNrLlxuICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKHZvaWQgMCwgXCJ3aGVuXCIsIFt2b2lkIDAsIGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICB2YXIgbmV3VmFsdWU7XG4gICAgICAgIHZhciB0aHJldyA9IGZhbHNlO1xuICAgICAgICB0cnkge1xuICAgICAgICA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ZWN0aW9uKHByb21pc2UsIHJlYXNvbikge1xuICAgIGlmICghdHJhY2tVbmhhbmRsZWRSZWplY3Rpb25zKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBwcm9jZXNzID09PSBcIm9iamVjdFwiICYmIHR5cGVvZiBwcm9jZXNzLmVtaXQgPT09IFwiZnVuY3Rpb25cIikge1xuICAgICAgICBRLm5leHRUaWNrLnJ1bkFmdGVyKGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICAgIGlmIChhcnJheV9pbmRleE9mKHVuaGFuZGxlZFJlamVjdGlvbnMsIHByb21pc2UpICE9PSAtMSkge1xuICAgICAgICAgICAgICAgIHByb2Nlc3MuZW1pdChcInVuaGFuZGxlZFJlamVjdGlvblwiLCByZWFzb24sIHByb21pc2UpO1xuICAgICAgICAgICAgICAgIHJlcG9ydGVkVW5oYW5kbGVkUmVqZWN0aW9ucy5wdXNoKHByb21pc2UpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB1bmhhbmRsZWRSZWplY3Rpb25zLnB1c2gocHJvbWlzZSk7XG4gICAgaWYgKHJlYXNvbiAmJiB0eXBlb2YgcmVhc29uLnN0YWNrICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHVuaGFuZGxlZFJlYXNvbnMucHVzaChyZWFzb24uc3RhY2spO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHVuaGFuZGxlZFJlYXNvbnMucHVzaChcIihubyBzdGFjaykgXCIgKyByZWFzb24pO1xuICAgIH1cbn1cblxuZnVuY3Rpb24gdW50cmFja1JlamVjdGlvbihwcm9taXNlKSB7XG4gICAgaWYgKCF0cmFja1VuaGFuZGxlZFJlamVjdGlvbnMpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cblxuICAgIHZhciBhdCA9IGFycmF5X2luZGV4T2YodW5oYW5kbGVkUmVqZWN0aW9ucywgcHJvbWlzZSk7XG4gICA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dlIGNhbiByZW1vdmVcbiAgICAgICAgICAgIC8vIHRoaXMgYmxvY2suXG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgU3RvcEl0ZXJhdGlvbiA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgIC8vIEVTNiBHZW5lcmF0b3JzXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZ2VuZXJhdG9yW3ZlcmJdKGFyZyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5kb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBRKHJlc3VsdC52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4ocmVzdWx0LnZhbHVlLCBjYWxsYmFjaywgZXJyYmFjayk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBTcGlkZXJNb25rZXkgR2VuZXJhdG9yc1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FOiBSZW1vdmUgdGhpcyBjYXNlIHdoZW4gU00gZG9lcyBFUzYgZ2VuZXJhdG9ycy5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBnZW5lcmF0b3JbdmVyYl0oYXJnKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChleGNlcHRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlzU3RvcEl0ZXJhdGlvbihleGNlcHRpb24pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUShleGNlcHRpb24udmFsdWU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ICAgICAgaXNQcm9taXNlKHByb21pc2UpICYmXG4gICAgICAgICAgICAgICAgKHNuYXBzaG90ID0gcHJvbWlzZS5pbnNwZWN0KCkpLnN0YXRlID09PSBcImZ1bGZpbGxlZFwiXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSBzbmFwc2hvdC52YWx1ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgKytwZW5kaW5nQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hlbihcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgtLXBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChwcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQubm90aWZ5KHsgaW5kZXg6IGluZGV4LCB2YWx1ZTogcHJvZ3Jlc3MgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LCB2b2lkIDApO1xuICAgICAgICBpZiAocGVuZGluZ0NvdW50ID09PSAwKSB7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHByb21pc2VzKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZGVmZXJyZWQucHJvbWlzZTtcbiAgICB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ICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gb25SZWplY3RlZCgpIHtcbiAgICAgICAgICAgIHBlbmRpbmdDb3VudC0tO1xuICAgICAgICAgICAgaWYgKHBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIFwiQ2FuJ3QgZ2V0IGZ1bGZpbGxtZW50IHZhbHVlIGZyb20gYW55IHByb21pc2UsIGFsbCBcIiArXG4gICAgICAgICAgICAgICAgICAgIFwicHJvbWlzZXMgd2VyZSByZWplY3RlZC5cIlxuICAgICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIG9uUHJvZ3Jlc3MocHJvZ3Jlc3MpIHtcbiAgICAgICAgICAgIGRlZmVycmVkLm5vdGlmeSh7XG4gICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxuICAgICAgICAgICAgICAgIHZhbHVlOiBwcm9ncmVzc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9LCB1bmRlZmluZWQpO1xuXG4gICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG59XG5cblByb21pc2UucHJvdG90eXBlLmFueSA9IGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gYW55KHRoaXMpO1xufTtcblxuLyoqXG4gKiBXYWl0cyBmb3IgYWxsIHByb21pc2VzIHRvIGJlIHNldHRsZWQsIGVpdGhlciBmdWxmaWxsZWQgb3JcbiAqIHJlamVjdGVkLiAgVGhpcyBpcyBkaXN0aW5jdCBmcm9tIGBhbGxgIHNpbmNlIHRoYXQgd291bGQgc3RvcFxuICogd2FpdGluZyBhdCB0aGUgZmlyc3QgcmVqZWN0aW9uLiAgVGhlIHByb21pc2UgcmV0dXJuZWQgYnlcbi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Y2FsbGJhY2tcbiAqIEByZXR1cm5zIGVpdGhlciB0aGUgcHJvbWlzZSBvciBub3RoaW5nXG4gKi9cblEubm9kZWlmeSA9IG5vZGVpZnk7XG5mdW5jdGlvbiBub2RlaWZ5KG9iamVjdCwgbm9kZWJhY2spIHtcbiAgICByZXR1cm4gUShvYmplY3QpLm5vZGVpZnkobm9kZWJhY2spO1xufVxuXG5Qcm9taXNlLnByb3RvdHlwZS5ub2RlaWZ5ID0gZnVuY3Rpb24gKG5vZGViYWNrKSB7XG4gICAgaWYgKG5vZGViYWNrKSB7XG4gICAgICAgIHRoaXMudGhlbihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgIFEubmV4dFRpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG5vZGViYWNrKG51bGwsIHZhbHVlKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LCBmdW5jdGlvbiAoZXJyb3IpIHtcbiAgICAgICAgICAgIFEubmV4dFRpY2soZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgIG5vZGViYWNrKGVycm9yKTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG59O1xuXG5RLm5vQ29uZmxpY3QgPSBmdW5jdGlvbigpIHtcbiAgICB0aHJvdyBuZXcgRXJyb3IoXCJRLm5vQ29uZmxpY3Qgb25seSB3b3JrcyB3aGVuIFEgaXMgdXNlZCBhcyBhIGdsb2JhbFwiKTtcbn07XG5cbi8vIEFsbCBjb2RlIGJlZm9yZSB0aGlzIHBvaW50IHdpbGwgYmUgZmlsdGVyZWQgZnJvbSBzdGFjayB0cmFjZXMuXG52YXIgcUVuZGluZ0xpbmUgPSBjYXB0dXJlTGluZSgpO1xuXG5yZXR1cm4gUTtcblxufSk7XG4iXX0=\r
+},{"_process":13}],160:[function(require,module,exports){\r
+\r
+/**\r
+ * Reduce `arr` with `fn`.\r
+ *\r
+ * @param {Array} arr\r
+ * @param {Function} fn\r
+ * @param {Mixed} initial\r
+ *\r
+ * TODO: combatible error handling?\r
+ */\r
+\r
+module.exports = function(arr, fn, initial){  \r
+  var idx = 0;\r
+  var len = arr.length;\r
+  var curr = arguments.length == 3\r
+    ? initial\r
+    : arr[idx++];\r
+\r
+  while (idx < len) {\r
+    curr = fn.call(null, curr, arr[idx], ++idx, arr);\r
+  }\r
+  \r
+  return curr;\r
+};\r
+},{}],161:[function(require,module,exports){\r
+/**\r
+ * Module dependencies.\r
+ */\r
+\r
+var Emitter = require('emitter');\r
+var reduce = require('reduce');\r
+\r
+/**\r
+ * Root reference for iframes.\r
+ */\r
+\r
+var root;\r
+if (typeof window !== 'undefined') { // Browser window\r
+  root = window;\r
+} else if (typeof self !== 'undefined') { // Web Worker\r
+  root = self;\r
+} else { // Other environments\r
+  root = this;\r
+}\r
+\r
+/**\r
+ * Noop.\r
+ */\r
+\r
+function noop(){};\r
+\r
+/**\r
+ * Check if `obj` is a host object,\r
+ * we don't want to serialize these :)\r
+ *\r
+ * TODO: future proof, move to compoent land\r
+ *\r
+ * @param {Object} obj\r
+ * @return {Boolean}\r
+ * @api private\r
+ */\r
+\r
+function isHost(obj) {\r
+  var str = {}.toString.call(obj);\r
+\r
+  switch (str) {\r
+    case '[object File]':\r
+    case '[object Blob]':\r
+    case '[object FormData]':\r
+      return true;\r
+    default:\r
+      return false;\r
+  }\r
+}\r
+\r
+/**\r
+ * Determine XHR.\r
+ */\r
+\r
+request.getXHR = function () {\r
+  if (root.XMLHttpRequest\r
+      && (!root.location || 'file:' != root.location.protocol\r
+          || !root.ActiveXObject)) {\r
+    return new XMLHttpRequest;\r
+  } else {\r
+    try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}\r
+    try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}\r
+    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}\r
+    try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}\r
+  }\r
+  return false;\r
+};\r
+\r
+/**\r
+ * Removes leading and trailing whitespace, added to support IE.\r
+ *\r
+ * @param {String} s\r
+ * @return {String}\r
+ * @api private\r
+ */\r
+\r
+var trim = ''.trim\r
+  ? function(s) { return s.trim(); }\r
+  : function(s) { return s.replace(/(^\s*|\s*$)/g, ''); };\r
+\r
+/**\r
+ * Check if `obj` is an object.\r
+ *\r
+ * @param {Object} obj\r
+ * @return {Boolean}\r
+ * @api private\r
+ */\r
+\r
+function isObject(obj) {\r
+  return obj === Object(obj);\r
+}\r
+\r
+/**\r
+ * Serialize the given `obj`.\r
+ *\r
+ * @param {Object} obj\r
+ * @return {String}\r
+ * @api private\r
+ */\r
+\r
+function serialize(obj) {\r
+  if (!isObject(obj)) return obj;\r
+  var pairs = [];\r
+  for (var key in obj) {\r
+    if (null != obj[key]) {\r
+      pushEncodedKeyValuePair(pairs, key, obj[key]);\r
+        }\r
+      }\r
+  return pairs.join('&');\r
+}\r
+\r
+/**\r
+ * Helps 'serialize' with serializing arrays.\r
+ * Mutates the pairs array.\r
+ *\r
+ * @param {Array} pairs\r
+ * @param {String} key\r
+ * @param {Mixed} val\r
+ */\r
+\r
+function pushEncodedKeyValuePair(pairs, key, val) {\r
+  if (Array.isArray(val)) {\r
+    return val.forEach(function(v) {\r
+      pushEncodedKeyValuePair(pairs, key, v);\r
+    });\r
+  }\r
+  pairs.push(encodeURIComponent(key)\r
+    + '=' + encodeURIComponent(val));\r
+}\r
+\r
+/**\r
+ * Expose serialization method.\r
+ */\r
+\r
+ request.serializeObject = serialize;\r
+\r
+ /**\r
+  * Parse the given x-www-form-urlencoded `str`.\r
+  *\r
+  * @param {String} str\r
+  * @return {Object}\r
+  * @api private\r
+  */\r
+\r
+function parseString(str) {\r
+  var obj = {};\r
+  var pairs = str.split('&');\r
+  var parts;\r
+  var pair;\r
+\r
+  for (var i = 0, len = pairs.length; i < len; ++i) {\r
+    pair = pairs[i];\r
+    parts = pair.split('=');\r
+    obj[decodeURIComponent(parts[0])] = decodeURIComponent(parts[1]);\r
+  }\r
+\r
+  return obj;\r
+}\r
+\r
+/**\r
+ * Expose parser.\r
+ */\r
+\r
+request.parseString = parseString;\r
+\r
+/**\r
+ * Default MIME type map.\r
+ *\r
+ *     superagent.types.xml = 'application/xml';\r
+ *\r
+ */\r
+\r
+request.types = {\r
+  html: 'text/html',\r
+  json: 'application/json',\r
+  xml: 'application/xml',\r
+  urlencoded: 'application/x-www-form-urlencoded',\r
+  'form': 'application/x-www-form-urlencoded',\r
+  'form-data': 'application/x-www-form-urlencoded'\r
+};\r
+\r
+/**\r
+ * Default serialization map.\r
+ *\r
+ *     superagent.serialize['application/xml'] = function(obj){\r
+ *       return 'generated xml here';\r
+ *     };\r
+ *\r
+ */\r
+\r
+ request.serialize = {\r
+   'application/x-www-form-urlencoded': serialize,\r
+   'application/json': JSON.stringify\r
+ };\r
+\r
+ /**\r
+  * Default parsers.\r
+  *\r
+  *     superagent.parse['application/xml'] = function(str){\r
+  *       return { object parsed from str };\r
+  *     };\r
+  *\r
+  */\r
+\r
+request.parse = {\r
+  'application/x-www-form-urlencoded': parseString,\r
+  'application/json': JSON.parse\r
+};\r
+\r
+/**\r
+ * Parse the given header `str` into\r
+ * an object containing the mapped fields.\r
+ *\r
+ * @param {String} str\r
+ * @return {Object}\r
+ * @api private\r
+ */\r
+\r
+function parseHeader(str) {\r
+  var lines = str.split(/\r?\n/);\r
+  var fields = {};\r
+  var index;\r
+  var line;\r
+  var field;\r
+  var val;\r
+\r
+  lines.pop(); // trailing CRLF\r
+\r
+  for (var i = 0, len = lines.length; i < len; ++i) {\r
+    line = lines[i];\r
+    index = line.indexOf(':');\r
+    field = line.slice(0, index).toLowerCase();\r
+    val = trim(line.slice(index + 1));\r
+    fields[field] = val;\r
+  }\r
+\r
+  return fields;\r
+}\r
+\r
+/**\r
+ * Check if `mime` is json or has +json structured syntax suffix.\r
+ *\r
+ * @param {String} mime\r
+ * @return {Boolean}\r
+ * @api private\r
+ */\r
+\r
+function isJSON(mime) {\r
+  return /[\/+]json\b/.test(mime);\r
+}\r
+\r
+/**\r
+ * Return the mime type for the given `str`.\r
+ *\r
+ * @param {String} str\r
+ * @return {String}\r
+ * @api private\r
+ */\r
+\r
+function type(str){\r
+  return str.split(/ *; */).shift();\r
+};\r
+\r
+/**\r
+ * Return header field parameters.\r
+ *\r
+ * @param {String} str\r
+ * @return {Object}\r
+ * @api private\r
+ */\r
+\r
+function params(str){\r
+  return reduce(str.split(/ *; */), function(obj, str){\r
+    var parts = str.split(/ *= */)\r
+      , key = parts.shift()\r
+      , val = parts.shift();\r
+\r
+    if (key && val) obj[key] = val;\r
+    return obj;\r
+  }, {});\r
+};\r
+\r
+/**\r
+ * Initialize a new `Response` with the given `xhr`.\r
+ *\r
+ *  - set flags (.ok, .error, etc)\r
+ *  - parse header\r
+ *\r
+ * Examples:\r
+ *\r
+ *  Aliasing `superagent` as `request` is nice:\r
+ *\r
+ *      request = superagent;\r
+ *\r
+ *  We can use the promise-like API, or pass callbacks:\r
+ *\r
+ *      request.get('/').end(function(res){});\r
+ *      request.get('/', function(res){});\r
+ *\r
+ *  Sending data can be chained:\r
+ *\r
+ *      request\r
+ *        .post('/user')\r
+ *        .send({ name: 'tj' })\r
+ *        .end(function(res){});\r
+ *\r
+ *  Or passed to `.send()`:\r
+ *\r
+ *      request\r
+ *        .post('/user')\r
+ *        .send({ name: 'tj' }, function(res){});\r
+ *\r
+ *  Or passed to `.post()`:\r
+ *\r
+ *      request\r
+ *        .post('/user', { name: 'tj' })\r
+ *        .end(function(res){});\r
+ *\r
+ * Or further reduced to a single call for simple cases:\r
+ *\r
+ *      request\r
+ *        .post('/user', { name: 'tj' }, function(res){});\r
+ *\r
+ * @param {XMLHTTPRequest} xhr\r
+ * @param {Object} options\r
+ * @api private\r
+ */\r
+\r
+function Response(req, options) {\r
+  options = options || {};\r
+  this.req = req;\r
+  this.xhr = this.req.xhr;\r
+  // responseText is accessible only if responseType is '' or 'text' and on older browsers\r
+  this.text = ((this.req.method !='HEAD' && (this.xhr.responseType === '' || this.xhr.responseType === 'text')) || typeof this.xhr.responseType === 'undefined')\r
+     ? this.xhr.responseText\r
+     : null;\r
+  this.statusText = this.req.xhr.statusText;\r
+  this.setStatusProperties(this.xhr.status);\r
+  this.header = this.headers = parseHeader(this.xhr.getAllResponseHeaders());\r
+  // getAllResponseHeaders sometimes falsely returns "" for CORS requests, but\r
+  // getResponseHeader still works. so we get content-type even if getting\r
+  // other headers fails.\r
+  this.header['content-type'] = this.xhr.getResponseHeader('content-type');\r
+  this.setHeaderProperties(this.header);\r
+  this.body = this.req.method != 'HEAD'\r
+    ? this.parseBody(this.text ? this.text : this.xhr.response)\r
+    : null;\r
+}\r
+\r
+/**\r
+ * Get case-insensitive `field` value.\r
+ *\r
+ * @param {String} field\r
+ * @return {String}\r
+ * @api public\r
+ */\r
+\r
+Response.prototype.get = function(field){\r
+  return this.header[field.toLowerCase()];\r
+};\r
+\r
+/**\r
+ * Set header related properties:\r
+ *\r
+ *   - `.type` the content type without params\r
+ *\r
+ * A response of "Content-Type: text/plain; charset=utf-8"\r
+ * will provide you with a `.type` of "text/plain".\r
+ *\r
+ * @param {Object} header\r
+ * @api private\r
+ */\r
+\r
+Response.prototype.setHeaderProperties = function(header){\r
+  // content-type\r
+  var ct = this.header['content-type'] || '';\r
+  this.type = type(ct);\r
+\r
+  // params\r
+  var obj = params(ct);\r
+  for (var key in obj) this[key] = obj[key];\r
+};\r
+\r
+/**\r
+ * Parse the given body `str`.\r
+ *\r
+ * Used for auto-parsing of bodies. Parsers\r
+ * are defined on the `superagent.parse` object.\r
+ *\r
+ * @param {String} str\r
+ * @return {Mixed}\r
+ * @api private\r
+ */\r
+\r
+Response.prototype.parseBody = function(str){\r
+  var parse = request.parse[this.type];\r
+  return parse && str && (str.length || str instanceof Object)\r
+    ? parse(str)\r
+    : null;\r
+};\r
+\r
+/**\r
+ * Set flags such as `.ok` based on `status`.\r
+ *\r
+ * For example a 2xx response will give you a `.ok` of __true__\r
+ * whereas 5xx will be __false__ and `.error` will be __true__. The\r
+ * `.clientError` and `.serverError` are also available to be more\r
+ * specific, and `.statusType` is the class of error ranging from 1..5\r
+ * sometimes useful for mapping respond colors etc.\r
+ *\r
+ * "sugar" properties are also defined for common cases. Currently providing:\r
+ *\r
+ *   - .noContent\r
+ *   - .badRequest\r
+ *   - .unauthorized\r
+ *   - .notAcceptable\r
+ *   - .notFound\r
+ *\r
+ * @param {Number} status\r
+ * @api private\r
+ */\r
+\r
+Response.prototype.setStatusProperties = function(status){\r
+  // handle IE9 bug: http://stackoverflow.com/questions/10046972/msie-returns-status-code-of-1223-for-ajax-request\r
+  if (status === 1223) {\r
+    status = 204;\r
+  }\r
+\r
+  var type = status / 100 | 0;\r
+\r
+  // status / class\r
+  this.status = this.statusCode = status;\r
+  this.statusType = type;\r
+\r
+  // basics\r
+  this.info = 1 == type;\r
+  this.ok = 2 == type;\r
+  this.clientError = 4 == type;\r
+  this.serverError = 5 == type;\r
+  this.error = (4 == type || 5 == type)\r
+    ? this.toError()\r
+    : false;\r
+\r
+  // sugar\r
+  this.accepted = 202 == status;\r
+  this.noContent = 204 == status;\r
+  this.badRequest = 400 == status;\r
+  this.unauthorized = 401 == status;\r
+  this.notAcceptable = 406 == status;\r
+  this.notFound = 404 == status;\r
+  this.forbidden = 403 == status;\r
+};\r
+\r
+/**\r
+ * Return an `Error` representative of this response.\r
+ *\r
+ * @return {Error}\r
+ * @api public\r
+ */\r
+\r
+Response.prototype.toError = function(){\r
+  var req = this.req;\r
+  var method = req.method;\r
+  var url = req.url;\r
+\r
+  var msg = 'cannot ' + method + ' ' + url + ' (' + this.status + ')';\r
+  var err = new Error(msg);\r
+  err.status = this.status;\r
+  err.method = method;\r
+  err.url = url;\r
+\r
+  return err;\r
+};\r
+\r
+/**\r
+ * Expose `Response`.\r
+ */\r
+\r
+request.Response = Response;\r
+\r
+/**\r
+ * Initialize a new `Request` with the given `method` and `url`.\r
+ *\r
+ * @param {String} method\r
+ * @param {String} url\r
+ * @api public\r
+ */\r
+\r
+function Request(method, url) {\r
+  var self = this;\r
+  Emitter.call(this);\r
+  this._query = this._query || [];\r
+  this.method = method;\r
+  this.url = url;\r
+  this.header = {};\r
+  this._header = {};\r
+  this.on('end', function(){\r
+    var err = null;\r
+    var res = null;\r
+\r
+    try {\r
+      res = new Response(self);\r
+    } catch(e) {\r
+      err = new Error('Parser is unable to parse the response');\r
+      err.parse = true;\r
+      err.original = e;\r
+      // issue #675: return the raw response if the response parsing fails\r
+      err.rawResponse = self.xhr && self.xhr.responseText ? self.xhr.responseText : null;\r
+      return self.callback(err);\r
+    }\r
+\r
+    self.emit('response', res);\r
+\r
+    if (err) {\r
+      return self.callback(err, res);\r
+    }\r
+\r
+    if (res.status >= 200 && res.status < 300) {\r
+      return self.callback(err, res);\r
+    }\r
+\r
+    var new_err = new Error(res.statusText || 'Unsuccessful HTTP response');\r
+    new_err.original = err;\r
+    new_err.response = res;\r
+    new_err.status = res.status;\r
+\r
+    self.callback(new_err, res);\r
+  });\r
+}\r
+\r
+/**\r
+ * Mixin `Emitter`.\r
+ */\r
+\r
+Emitter(Request.prototype);\r
+\r
+/**\r
+ * Allow for extension\r
+ */\r
+\r
+Request.prototype.use = function(fn) {\r
+  fn(this);\r
+  return this;\r
+}\r
+\r
+/**\r
+ * Set timeout to `ms`.\r
+ *\r
+ * @param {Number} ms\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.timeout = function(ms){\r
+  this._timeout = ms;\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Clear previous timeout.\r
+ *\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.clearTimeout = function(){\r
+  this._timeout = 0;\r
+  clearTimeout(this._timer);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Abort the request, and clear potential timeout.\r
+ *\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.abort = function(){\r
+  if (this.aborted) return;\r
+  this.aborted = true;\r
+  this.xhr.abort();\r
+  this.clearTimeout();\r
+  this.emit('abort');\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Set header `field` to `val`, or multiple fields with one object.\r
+ *\r
+ * Examples:\r
+ *\r
+ *      req.get('/')\r
+ *        .set('Accept', 'application/json')\r
+ *        .set('X-API-Key', 'foobar')\r
+ *        .end(callback);\r
+ *\r
+ *      req.get('/')\r
+ *        .set({ Accept: 'application/json', 'X-API-Key': 'foobar' })\r
+ *        .end(callback);\r
+ *\r
+ * @param {String|Object} field\r
+ * @param {String} val\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.set = function(field, val){\r
+  if (isObject(field)) {\r
+    for (var key in field) {\r
+      this.set(key, field[key]);\r
+    }\r
+    return this;\r
+  }\r
+  this._header[field.toLowerCase()] = val;\r
+  this.header[field] = val;\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Remove header `field`.\r
+ *\r
+ * Example:\r
+ *\r
+ *      req.get('/')\r
+ *        .unset('User-Agent')\r
+ *        .end(callback);\r
+ *\r
+ * @param {String} field\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.unset = function(field){\r
+  delete this._header[field.toLowerCase()];\r
+  delete this.header[field];\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Get case-insensitive header `field` value.\r
+ *\r
+ * @param {String} field\r
+ * @return {String}\r
+ * @api private\r
+ */\r
+\r
+Request.prototype.getHeader = function(field){\r
+  return this._header[field.toLowerCase()];\r
+};\r
+\r
+/**\r
+ * Set Content-Type to `type`, mapping values from `request.types`.\r
+ *\r
+ * Examples:\r
+ *\r
+ *      superagent.types.xml = 'application/xml';\r
+ *\r
+ *      request.post('/')\r
+ *        .type('xml')\r
+ *        .send(xmlstring)\r
+ *        .end(callback);\r
+ *\r
+ *      request.post('/')\r
+ *        .type('application/xml')\r
+ *        .send(xmlstring)\r
+ *        .end(callback);\r
+ *\r
+ * @param {String} type\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.type = function(type){\r
+  this.set('Content-Type', request.types[type] || type);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Force given parser\r
+ *\r
+ * Sets the body parser no matter type.\r
+ *\r
+ * @param {Function}\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.parse = function(fn){\r
+  this._parser = fn;\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Set Accept to `type`, mapping values from `request.types`.\r
+ *\r
+ * Examples:\r
+ *\r
+ *      superagent.types.json = 'application/json';\r
+ *\r
+ *      request.get('/agent')\r
+ *        .accept('json')\r
+ *        .end(callback);\r
+ *\r
+ *      request.get('/agent')\r
+ *        .accept('application/json')\r
+ *        .end(callback);\r
+ *\r
+ * @param {String} accept\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.accept = function(type){\r
+  this.set('Accept', request.types[type] || type);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Set Authorization field value with `user` and `pass`.\r
+ *\r
+ * @param {String} user\r
+ * @param {String} pass\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.auth = function(user, pass){\r
+  var str = btoa(user + ':' + pass);\r
+  this.set('Authorization', 'Basic ' + str);\r
+  return this;\r
+};\r
+\r
+/**\r
+* Add query-string `val`.\r
+*\r
+* Examples:\r
+*\r
+*   request.get('/shoes')\r
+*     .query('size=10')\r
+*     .query({ color: 'blue' })\r
+*\r
+* @param {Object|String} val\r
+* @return {Request} for chaining\r
+* @api public\r
+*/\r
+\r
+Request.prototype.query = function(val){\r
+  if ('string' != typeof val) val = serialize(val);\r
+  if (val) this._query.push(val);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Write the field `name` and `val` for "multipart/form-data"\r
+ * request bodies.\r
+ *\r
+ * ``` js\r
+ * request.post('/upload')\r
+ *   .field('foo', 'bar')\r
+ *   .end(callback);\r
+ * ```\r
+ *\r
+ * @param {String} name\r
+ * @param {String|Blob|File} val\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.field = function(name, val){\r
+  if (!this._formData) this._formData = new root.FormData();\r
+  this._formData.append(name, val);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Queue the given `file` as an attachment to the specified `field`,\r
+ * with optional `filename`.\r
+ *\r
+ * ``` js\r
+ * request.post('/upload')\r
+ *   .attach(new Blob(['<a id="a"><b id="b">hey!</b></a>'], { type: "text/html"}))\r
+ *   .end(callback);\r
+ * ```\r
+ *\r
+ * @param {String} field\r
+ * @param {Blob|File} file\r
+ * @param {String} filename\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.attach = function(field, file, filename){\r
+  if (!this._formData) this._formData = new root.FormData();\r
+  this._formData.append(field, file, filename || file.name);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Send `data` as the request body, defaulting the `.type()` to "json" when\r
+ * an object is given.\r
+ *\r
+ * Examples:\r
+ *\r
+ *       // manual json\r
+ *       request.post('/user')\r
+ *         .type('json')\r
+ *         .send('{"name":"tj"}')\r
+ *         .end(callback)\r
+ *\r
+ *       // auto json\r
+ *       request.post('/user')\r
+ *         .send({ name: 'tj' })\r
+ *         .end(callback)\r
+ *\r
+ *       // manual x-www-form-urlencoded\r
+ *       request.post('/user')\r
+ *         .type('form')\r
+ *         .send('name=tj')\r
+ *         .end(callback)\r
+ *\r
+ *       // auto x-www-form-urlencoded\r
+ *       request.post('/user')\r
+ *         .type('form')\r
+ *         .send({ name: 'tj' })\r
+ *         .end(callback)\r
+ *\r
+ *       // defaults to x-www-form-urlencoded\r
+  *      request.post('/user')\r
+  *        .send('name=tobi')\r
+  *        .send('species=ferret')\r
+  *        .end(callback)\r
+ *\r
+ * @param {String|Object} data\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.send = function(data){\r
+  var obj = isObject(data);\r
+  var type = this.getHeader('Content-Type');\r
+\r
+  // merge\r
+  if (obj && isObject(this._data)) {\r
+    for (var key in data) {\r
+      this._data[key] = data[key];\r
+    }\r
+  } else if ('string' == typeof data) {\r
+    if (!type) this.type('form');\r
+    type = this.getHeader('Content-Type');\r
+    if ('application/x-www-form-urlencoded' == type) {\r
+      this._data = this._data\r
+        ? this._data + '&' + data\r
+        : data;\r
+    } else {\r
+      this._data = (this._data || '') + data;\r
+    }\r
+  } else {\r
+    this._data = data;\r
+  }\r
+\r
+  if (!obj || isHost(data)) return this;\r
+  if (!type) this.type('json');\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Invoke the callback with `err` and `res`\r
+ * and handle arity check.\r
+ *\r
+ * @param {Error} err\r
+ * @param {Response} res\r
+ * @api private\r
+ */\r
+\r
+Request.prototype.callback = function(err, res){\r
+  var fn = this._callback;\r
+  this.clearTimeout();\r
+  fn(err, res);\r
+};\r
+\r
+/**\r
+ * Invoke callback with x-domain error.\r
+ *\r
+ * @api private\r
+ */\r
+\r
+Request.prototype.crossDomainError = function(){\r
+  var err = new Error('Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.');\r
+  err.crossDomain = true;\r
+\r
+  err.status = this.status;\r
+  err.method = this.method;\r
+  err.url = this.url;\r
+\r
+  this.callback(err);\r
+};\r
+\r
+/**\r
+ * Invoke callback with timeout error.\r
+ *\r
+ * @api private\r
+ */\r
+\r
+Request.prototype.timeoutError = function(){\r
+  var timeout = this._timeout;\r
+  var err = new Error('timeout of ' + timeout + 'ms exceeded');\r
+  err.timeout = timeout;\r
+  this.callback(err);\r
+};\r
+\r
+/**\r
+ * Enable transmission of cookies with x-domain requests.\r
+ *\r
+ * Note that for this to work the origin must not be\r
+ * using "Access-Control-Allow-Origin" with a wildcard,\r
+ * and also must set "Access-Control-Allow-Credentials"\r
+ * to "true".\r
+ *\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.withCredentials = function(){\r
+  this._withCredentials = true;\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Initiate request, invoking callback `fn(res)`\r
+ * with an instanceof `Response`.\r
+ *\r
+ * @param {Function} fn\r
+ * @return {Request} for chaining\r
+ * @api public\r
+ */\r
+\r
+Request.prototype.end = function(fn){\r
+  var self = this;\r
+  var xhr = this.xhr = request.getXHR();\r
+  var query = this._query.join('&');\r
+  var timeout = this._timeout;\r
+  var data = this._formData || this._data;\r
+\r
+  // store callback\r
+  this._callback = fn || noop;\r
+\r
+  // state change\r
+  xhr.onreadystatechange = function(){\r
+    if (4 != xhr.readyState) return;\r
+\r
+    // In IE9, reads to any property (e.g. status) off of an aborted XHR will\r
+    // result in the error "Could not complete the operation due to error c00c023f"\r
+    var status;\r
+    try { status = xhr.status } catch(e) { status = 0; }\r
+\r
+    if (0 == status) {\r
+      if (self.timedout) return self.timeoutError();\r
+      if (self.aborted) return;\r
+      return self.crossDomainError();\r
+    }\r
+    self.emit('end');\r
+  };\r
+\r
+  // progress\r
+  var handleProgress = function(e){\r
+    if (e.total > 0) {\r
+      e.percent = e.loaded / e.total * 100;\r
+    }\r
+    e.direction = 'download';\r
+    self.emit('progress', e);\r
+  };\r
+  if (this.hasListeners('progress')) {\r
+    xhr.onprogress = handleProgress;\r
+  }\r
+  try {\r
+    if (xhr.upload && this.hasListeners('progress')) {\r
+      xhr.upload.onprogress = handleProgress;\r
+    }\r
+  } catch(e) {\r
+    // Accessing xhr.upload fails in IE from a web worker, so just pretend it doesn't exist.\r
+    // Reported here:\r
+    // https://connect.microsoft.com/IE/feedback/details/837245/xmlhttprequest-upload-throws-invalid-argument-when-used-from-web-worker-context\r
+  }\r
+\r
+  // timeout\r
+  if (timeout && !this._timer) {\r
+    this._timer = setTimeout(function(){\r
+      self.timedout = true;\r
+      self.abort();\r
+    }, timeout);\r
+  }\r
+\r
+  // querystring\r
+  if (query) {\r
+    query = request.serializeObject(query);\r
+    this.url += ~this.url.indexOf('?')\r
+      ? '&' + query\r
+      : '?' + query;\r
+  }\r
+\r
+  // initiate request\r
+  xhr.open(this.method, this.url, true);\r
+\r
+  // CORS\r
+  if (this._withCredentials) xhr.withCredentials = true;\r
+\r
+  // body\r
+  if ('GET' != this.method && 'HEAD' != this.method && 'string' != typeof data && !isHost(data)) {\r
+    // serialize stuff\r
+    var contentType = this.getHeader('Content-Type');\r
+    var serialize = this._parser || request.serialize[contentType ? contentType.split(';')[0] : ''];\r
+    if (!serialize && isJSON(contentType)) serialize = request.serialize['application/json'];\r
+    if (serialize) data = serialize(data);\r
+  }\r
+\r
+  // set header fields\r
+  for (var field in this.header) {\r
+    if (null == this.header[field]) continue;\r
+    xhr.setRequestHeader(field, this.header[field]);\r
+  }\r
+\r
+  // send stuff\r
+  this.emit('request', this);\r
+\r
+  // IE11 xhr.send(undefined) sends 'undefined' string as POST payload (instead of nothing)\r
+  // We need null here if data is undefined\r
+  xhr.send(typeof data !== 'undefined' ? data : null);\r
+  return this;\r
+};\r
+\r
+/**\r
+ * Faux promise support\r
+ *\r
+ * @param {Function} fulfill\r
+ * @param {Function} reject\r
+ * @return {Request}\r
+ */\r
+\r
+Request.prototype.then = function (fulfill, reject) {\r
+  return this.end(function(err, res) {\r
+    err ? reject(err) : fulfill(res);\r
+  });\r
+}\r
+\r
+/**\r
+ * Expose `Request`.\r
+ */\r
+\r
+request.Request = Request;\r
+\r
+/**\r
+ * Issue a request:\r
+ *\r
+ * Examples:\r
+ *\r
+ *    request('GET', '/users').end(callback)\r
+ *    request('/users').end(callback)\r
+ *    request('/users', callback)\r
+ *\r
+ * @param {String} method\r
+ * @param {String|Function} url or callback\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+function request(method, url) {\r
+  // callback\r
+  if ('function' == typeof url) {\r
+    return new Request('GET', method).end(url);\r
+  }\r
+\r
+  // url first\r
+  if (1 == arguments.length) {\r
+    return new Request('GET', method);\r
+  }\r
+\r
+  return new Request(method, url);\r
+}\r
+\r
+/**\r
+ * GET `url` with optional callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Mixed|Function} data or fn\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+request.get = function(url, data, fn){\r
+  var req = request('GET', url);\r
+  if ('function' == typeof data) fn = data, data = null;\r
+  if (data) req.query(data);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+/**\r
+ * HEAD `url` with optional callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Mixed|Function} data or fn\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+request.head = function(url, data, fn){\r
+  var req = request('HEAD', url);\r
+  if ('function' == typeof data) fn = data, data = null;\r
+  if (data) req.send(data);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+/**\r
+ * DELETE `url` with optional callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+function del(url, fn){\r
+  var req = request('DELETE', url);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+request['del'] = del;\r
+request['delete'] = del;\r
+\r
+/**\r
+ * PATCH `url` with optional `data` and callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Mixed} data\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+request.patch = function(url, data, fn){\r
+  var req = request('PATCH', url);\r
+  if ('function' == typeof data) fn = data, data = null;\r
+  if (data) req.send(data);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+/**\r
+ * POST `url` with optional `data` and callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Mixed} data\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+request.post = function(url, data, fn){\r
+  var req = request('POST', url);\r
+  if ('function' == typeof data) fn = data, data = null;\r
+  if (data) req.send(data);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+/**\r
+ * PUT `url` with optional `data` and callback `fn(res)`.\r
+ *\r
+ * @param {String} url\r
+ * @param {Mixed|Function} data or fn\r
+ * @param {Function} fn\r
+ * @return {Request}\r
+ * @api public\r
+ */\r
+\r
+request.put = function(url, data, fn){\r
+  var req = request('PUT', url);\r
+  if ('function' == typeof data) fn = data, data = null;\r
+  if (data) req.send(data);\r
+  if (fn) req.end(fn);\r
+  return req;\r
+};\r
+\r
+/**\r
+ * Expose `request`.\r
+ */\r
+\r
+module.exports = request;\r
+\r
+},{"emitter":19,"reduce":160}]},{},[1])(1)\r
+});\r
+//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm5vZGVfbW9kdWxlcy9icm93c2VyaWZ5L25vZGVfbW9kdWxlcy9icm93c2VyLXBhY2svX3ByZWx1ZGUuanMiLCJpbmRleC5qcyIsImxpYi9hdXRoLmpzIiwibGliL2NsaWVudC5qcyIsImxpYi9oZWxwZXJzLmpzIiwibGliL2h0dHAuanMiLCJsaWIvcmVzb2x2ZXIuanMiLCJsaWIvc2NoZW1hLW1hcmt1cC5qcyIsImxpYi9zcGVjLWNvbnZlcnRlci5qcyIsImxpYi90eXBlcy9tb2RlbC5qcyIsImxpYi90eXBlcy9vcGVyYXRpb24uanMiLCJsaWIvdHlwZXMvb3BlcmF0aW9uR3JvdXAuanMiLCJub2RlX21vZHVsZXMvYnJvd3NlcmlmeS9ub2RlX21vZHVsZXMvYnJvd3Nlci1yZXNvbHZlL2VtcHR5LmpzIiwibm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL3Byb2Nlc3MvYnJvd3Nlci5qcyIsIm5vZGVfbW9kdWxlcy9idG9hL2luZGV4LmpzIiwibm9kZV9tb2R1bGVzL2J1ZmZlci9pbmRleC5qcyIsIm5vZGVfbW9kdWxlcy9idWZmZXIvbm9kZV9tb2R1bGVzL2Jhc2U2NC1qcy9saW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ZTtcbn07XG5cbkFwaUtleUF1dGhvcml6YXRpb24ucHJvdG90eXBlLmFwcGx5ID0gZnVuY3Rpb24gKG9iaikge1xuICBpZiAodGhpcy50eXBlID09PSAncXVlcnknKSB7XG4gICAgLy8gc2VlIGlmIGFscmVhZHkgYXBwbGllZC4gIElmIHNvLCBkb24ndCBkbyBpdCBhZ2FpblxuXG4gICAgdmFyIHFwO1xuICAgIGlmIChvYmoudXJsLmluZGV4T2YoJz8nKSA+IDApIHtcbiAgICAgIHFwID0gb2JqLnVybC5zdWJzdHJpbmcob2JqLnVybC5pbmRleE9mKCc/JykgKyAxKTtcbiAgICAgIHZhciBwYXJ0cyA9IHFwLnNwbGl0KCcmJyk7XG4gICAgICBpZihwYXJ0cyAmJiBwYXJ0cy5sZW5ndGggPiAwKSB7XG4gICAgICAgIGZvcih2YXIgaSA9IDA7IGkgPCBwYXJ0cy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgIHZhciBrdiA9IHBhcnRzW2ldLnNwbGl0KCc9Jyk7XG4gICAgICAgICAgaWYoa3YgJiYga3YubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgaWYgKGt2WzBdID09PSB0aGlzLm5hbWUpIHtcbiAgICAgICAgICAgICAgLy8gc2tpcCBpdFxuICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKG9iai51cmwuaW5kZXhPZignPycpID4gMCkge1xuICAgICAgb2JqLnVybCA9IG9iai51cmwgKyAnJicgKyB0aGlzLm5hbWUgKyAnPScgKyB0aGlzLnZhbHVlO1xuICAgIH0gZWxzZSB7XG4gICAgICBvYmoudXJsID0gb2JqLnVybCArICc/JyArIHRoaXMubmFtZSArICc9JyArIHRoaXMudmFsdWU7XG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG4gIH0gZWxzZSBpZiAodGhpcy50eXBlID09PSAnaGVhZ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k9iamVjdC5leGVjdXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbk9iamVjdCk7XG4gICAgICAgIHNlbGYuYXBpc1thcGlQcm9wZXJ0eV1bb3BlcmF0aW9uSWRdLmhlbHAgPSBvcGVyYXRpb25Hcm91cFtvcGVyYXRpb25JZF0uaGVscCA9IF8uYmluZChvcGVyYXRpb25PYmplY3QuaGVscCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdGlvbk9iamVjdCk7XG4gICAgICAgIHNlbGYuYXBpc1thcGlQcm9wZXJ0eV1bb3BlcmF0aW9uSWRdLmFzQ3VybCA9IG9wZXJhdGlvbkdyb3VwW29wZXJhdGlvbklkXS5hc0N1cmwgPSBfLmJpbmQob3BlcmF0aW9uT2JqZWN0LmFzQ3VybCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRpb25PYmplY3QpO1xuXG4gICAgICAgIG9wZXJhdGlvbkdyb3VwLmFwaXNbb3BlcmF0aW9uSWRdID0gb3BlcmF0aW9uR3JvdXAub3BlcmF0aW9uc1tvcGVyYXRpb25JZF0gPSBvcGVyYXRpb25PYmplY3Q7XG5cbiAgICAgICAgLy8gbGVnYWN5IFVJIGZlYXR1cmVcbiAgICAgICAgdmFyIGFwaSA9IF8uZmluZChzZWxmLmFwaXNBcnJheSwgZnVuY3Rpb24gKGFwaSkge1xuICAgICAgICAgIHJldHVybiBhcGkudGFnID09PSB0YWc7XG4gICAgICAgIH0pO1xuXG4gICAgICAgIGlmIChhcGkpIHtcbiAgICAgICAgICBhcGkub3BlcmF0aW9uc0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ICB2YXIgZG9uZSA9IGZhbHNlOyB2YXIgY291bnRlciA9IDA7XG4gICAgICAgICAgICAgIHdoaWxlKCFkb25lKSB7XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHNwZWMuZGVmaW5pdGlvbnNbbmFtZV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICBkb25lID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBuYW1lID0gbW9kZWxOYW1lICsgJ18nICsgY291bnRlcjtcbiAgICAgICAgICAgICAgICBjb3VudGVyICsrO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIHNwZWMuZGVmaW5pdGlvbnNbbmFtZV0gPSB7IGFsbE9mOiBwYXJhbWV0ZXIuc2NoZW1hLmFsbE9mIH07XG4gICAgICAgICAgICAgIGRlbGV0ZSBwYXJhbWV0ZXIuc2NoZW1hLmFsbE9mO1xuICAgICAgICAgICAgICBwYXJhbWV0ZXIuc2NoZW1hLiRyZWYgPSAnIy9kZWZpbml0aW9ucy8nICsgbmFtZTtcbiAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQWxsT2Yocm9vdCwgbmFtZSwgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSwgcmVzb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgc3BlYyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlVG8ocm9vdCwgcGFyYW1ldGVyLnNjaGVtYSwgcmVzb2x1dGlvblRhYmxlLCBsb2NhdGlvbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKHBhcmFtZXRlci4kcmVmKSB7XG4gICAgICAgICAgICAvLyBwYXJhbWV0ZXIgcmVmZXJlbmNlXG4gICAgICAgICAgICB0aGlzLnJlc29sdmVJbmxpbmUocm9vdCwgc3BlYywgcGFyYW1ldGVyLCByZXNvbHV0aW9uVGFibGUsIHVucmVzb2x2ZWRSZWZzLCBwYXJhbWV0ZXIuJHJlZik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZm9yIChyZXNwb25zZUNvZGUgaW4gb3BlcmF0aW9uLnJlc3BvbnNlcykge1xuICAgICAgICAgIHZhciByZXNwb25zZSA9IG9wZXJhdGlvbi5yZXNwb25zZXNbcmVzcG9uc2VDb2RlXTtcbiAgICAgICAgICBsb2NhdGlvbiA9ICcvcGF0aHMnICsgbmFtZSArICcvJyArIG1ldGhvZCArICcvcmVzcG9uc2VzLycgKyByZXNwb25zZUNvZGU7XG5cbiAgICAgICAgICBpZihfLmlzT2JqZWN0KHJlc3BvbnNlKSkge1xuICAgICAgICAgICAgaWYocmVzcG9uc2UuJHJlZikge1xuICAgICAgICAgICAgICAvLyByZXNwb25zZSByZWZlcmVuY2VcbiAgICAgICAgICAgICAgdGhpcy5yZXNvbHZlSW5saW5lKHJvb3QsIHNwZWMsIHJlc3BvbnNlLCByZXNvbHV0aW9uVGFibGUsIHVucmVzb2x2ZWRSZWZzLCBsb2NhdGlvbik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAocmVzcG9uc2Uuc2NoZW1hKSB7XG4gICAgICAgICAgICAgIHZhciByZXNwb25zZU9iaiA9IHJlc3BvbnNlO1xuICAgICAgICAgICAgICBpZihfLmlzQXJyYXkocmVzcG9uc2VPYmouc2NoZW1hLmFsbE9mKSkge1xuICAgICAgICAgICAgICAgIC8vIG1vdmUgdG8gYSBkZWZpbml0aW9uXG4gICAgICAgICAgICAgICAgdmFyIG1vZGVsTmFtZSA9ICdpbmxpbmVfbW9kZWwnO1xuICAgICAgICAgICAgICAgIHZhciBuYW1lID0gbW9kZWxOYW1lO1xuICAgICAgICAgICAgICAgIHZhciBkb25lID0gZmFsc2U7IHZhciBjb3VudGVyID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSghZG9uZSkge1xuICAgICAgICAgICAgICAgICAgaWYodHlwZW9mIHNwZWMuZGVmaW5pdGlvbnNbbmFtZV0gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIG5hbWUgPSBtb2RlbE5hbWUgKyAnXycgKyBjb3VudGVyO1xuICAgICAgICAgICAgICAgICAgY291bnRlciArKztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSA9IHsgYWxsT2Y6IHJlc3BvbnNlT2JqLnNjaGVtYS5hbGxPZiB9O1xuICAgICAgICAgICAgICAgIGRlbGV0ZSByZXNwb25zZU9iai5zY2hlbWEuYWxsT2Y7XG4gICAgICAgICAgICAgICAgZGVsZXRlIHJlc3BvbnNlT2JqLnNjaGVtYS50eXBlO1xuICAgICAgICAgICAgICAgIHJlc3BvbnNlT2JqLnNjaGVtYS4kcmVmID0gJyMvZGVmaW5pdGlvbnMvJyArIG5hbWU7XG4gICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQWxsT2Yocm9vdCwgbmFtZSwgc3BlYy5kZWZpbml0aW9uc1tuYW1lXSwgcmVzb2x1dGlvblRhYmxlLCB1bnJlc29sdmVkUmVmcywgc3BlYyk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSBpZignYXJyYXknID09PSByZXNwb25zZU9iai5zY2hlbWEudHlwZSkge1xuICAgICAgICAgICAgICAgIGlmKHJlc3BvbnNlT2JqLnNjaGVtYS5pdGVtcyAmJiByZXNwb25zZU9iai5zY2hlbWEuaXRlbXMuJHJlZikge1xuICAgICAgICAgICAgICAgICAgLy8gcmVzcG9uc2UgcmVmZXJlbmNlXG4gICAgICAgICAgICAgICAgICB0aGlzLnJlc29sdmVJb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ICAgICAgICBpZihhLmtleS5pbmRleE9mKCcuLi8nKSA+PSAwKSB7XG4gICAgICAgICAgZm9yKHZhciBqID0gMDsgaiA8IGpvaW5lZC5sZW5ndGg7IGorKykge1xuICAgICAgICAgICAgaWYoam9pbmVkW2pdID09PSAnLi4nKSB7XG4gICAgICAgICAgICAgIG5vcm1hbGl6ZWQgPSBub3JtYWxpemVkLnNsaWNlKDAsIG5vcm1hbGl6ZWQubGVuZ3RoLTEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIG5vcm1hbGl6ZWQucHVzaChqb2luZWRbal0pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgICBmb3IoayA9IDA7IGsgPCBub3JtYWxpemVkLmxlbmd0aDsgayArKykge1xuICAgICAgICAgICAgaWYoayA+IDApIHtcbiAgICAgICAgICAgICAgdXJsICs9ICcvJztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHVybCArPSBub3JtYWxpemVkW2tdO1xuICAgICAgICAgIH1cbiAgICAgICAgICAvLyB3ZSBub3cgaGF2ZSB0byByZW1vdGUgcmVzb2x2ZSB0aGlzIGJlY2F1c2UgdGhlIHBhdGggaGFzIGNoYW5nZWRcbiAgICAgICAgICBhLnJvb3QgPSB1cmw7XG4gICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgcGFydHMgPSBhLmtleS5zcGxpdCgnIycpO1xuICAgICAgICAgIGlmKHBhcnRzLmxlbmd0aCA9PT0gMikge1xuICAgICAgICAgICAgaWYocGFydHNbMF0uaW5kZXhPZignaHR0cDovLycpID09PSAwIHx8IHBhcnRzWzBdLmluZGV4T2YoJ2h0dHBzOi8vJykgPT09IDApIHtcbiAgICAgICAgICAgICAgYS5yb290ID0gcGFydHNbMF07XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBsb2NhdGlvbiA9IHBhcnRzWzFdLnNwbGl0KCcvJyk7XG4gICAgICAgICAgICB2YXIgcjtcbiAgICAgICAgICAgIHZhciBzID0gc3BlYztcbiAgICAgICAgICAgIGZvcihrID0gMDsgayA8IGxvY2F0aW9uLmxlbmd0aDsgaysrKSB7XG4gICAgICAgICAgICAgIHZhciBwYXJ0ID0gbG9jYXRpb25ba107XG4gICAgICAgICAgICAgIGlmKHBhcnQgIT09ICcnKSB7XG4gICAgICAgICAgICAgICAgcyA9IHNbcGFydF07XG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIHMgIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICByID0gcztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICByID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYociA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBtdXN0IHJlc29sdmUgdGhpcyB0b29cbiAgICAgICAgICAgICAgdG9SZXNvbHZlLnB1c2goYSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgaWYgKGEucmVzb2x2ZUFzID09PSAnaW5saW5lJykge1xuICAgICAgICAgIGlmKGEua2V5ICYmIGEua2V5LmluZGV4T2YoJyMnKSA9PT0gLTEgJiYgYS5rZXkuY2hhckF0KDApICE9PSAnLycpIHtcbiAgICAgICAgICAgIC8vIGhhbmRsZSByZWxhdGl2ZSBzY2hlbWFcbiAgICAgICAgICAgIHBhcnRzID0gYS5yb290LnNwbGl0KCcvJyk7XG4gICAgICAgICAgICBsb2NhdGlvbiA9ICcnO1xuICAgICAgICAgICAgZm9yKGkgPSAwOyBpIDwgcGFydHMubGVuZ3RoIC0gMTsgaSsr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AgICAgIHNlbGYuZmluaXNoKHNwZWMsIHJvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgY2FsbGJhY2ssIHRydWUpO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgICBlbHNlIGlmKHNlbGYuZmFpbGVkVXJscy5pbmRleE9mKGl0ZW0ucm9vdCkgPT09IC0xKSB7XG4gICAgICAgIHZhciBvYmogPSB7XG4gICAgICAgICAgdXNlSlF1ZXJ5OiBmYWxzZSwgIC8vIFRPRE9cbiAgICAgICAgICB1cmw6IGl0ZW0ucm9vdCxcbiAgICAgICAgICBtZXRob2Q6ICdnZXQnLFxuICAgICAgICAgIGhlYWRlcnM6IHtcbiAgICAgICAgICAgIGFjY2VwdDogc2VsZi5zY29wZS5zd2FnZ2VyUmVxdWVzdEhlYWRlcnMgfHwgJ2FwcGxpY2F0aW9uL2pzb24nXG4gICAgICAgICAgfSxcbiAgICAgICAgICBvbjoge1xuICAgICAgICAgICAgZXJyb3I6IGZ1bmN0aW9uIChlcnJvcikge1xuICAgICAgICAgICAgICBwcm9jZXNzZWRDYWxscyArPSAxO1xuICAgICAgICAgICAgICBjb25zb2xlLmxvZygnZmFpbGVkIHVybDogJyArIG9iai51cmwpO1xuICAgICAgICAgICAgICBzZWxmLmZhaWxlZFVybHMucHVzaChvYmoudXJsKTtcbiAgICAgICAgICAgICAgdW5yZXNvbHZlZFJlZnNbaXRlbS5rZXldID0ge1xuICAgICAgICAgICAgICAgIHJvb3Q6IGl0ZW0ucm9vdCxcbiAgICAgICAgICAgICAgICBsb2NhdGlvbjogaXRlbS5sb2NhdGlvblxuICAgICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICAgIGlmIChwcm9jZXNzZWRDYWxscyA9PT0gZXhwZWN0ZWRDYWxscykge1xuICAgICAgICAgICAgICAgIHNlbGYuZmluaXNoKHNwZWMsIF9yb290LCByZXNvbHV0aW9uVGFibGUsIHJlc29sdmVkUmVmcywgdW5yZXNvbHZlZFJlZnMsIGNhbGxiYWNrKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSwgIC8vIGpzaGludCBpZ25vcmU6bGluZVxuICAgICAgICAgICAgcmVzcG9uc2U6IGZ1bmN0aW9uIChyZXNwb25zZSkge1xuICAgICAgICAgICAgICB2YXIgc3dhZ2dlciA9IHJlc3BvbnNlLm9iajtcbiAgICAgICAgICAgICAgc2VsZi5yZXNvbHZlSXRlbShzd2FnZ2VyLCBpdGVtLnJvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgaXRlbSk7XG4gICAgICAgICAgICAgIHByb2Nlc3NlZENhbGxzICs9IDE7XG5cbiAgICAgICAgICAgICAgaWYgKHByb2Nlc3NlZENhbGxzID09PSBleHBlY3RlZENhbGxzKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5maW5pc2goc3BlYywgX3Jvb3QsIHJlc29sdXRpb25UYWJsZSwgcmVzb2x2ZWRSZWZzLCB1bnJlc29sdmVkUmVmcywgY2FsbGJhY2spO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSAvLyBqc2hpbnQgaWdub3JlOmxpbmVcbiAgICAgICAgfTtcblxuICAgICAgICBpZiAoc2NvcGUgJiYgc2NvcGUuY2xpZW50QXV0aG9yaXphdGlvbnMpIHtcbiAgICAgICAgICBzY29wZS5jbGllbnRBdXRob3JpemF0aW9ucy5hcHBseShvYmopO1xuICAgICAgICB9XG5cbiAgICAgICAgbmV3IFN3YWdnZXJIdHRwKCkuZXhlY3V0ZShvYmosIG9wdHMpO1xuICAgICAgfVxuICAgICAgZWxzZSB7XG4gICAgICAgIHByb2Nlc3NlZENhbGxzICs9IDE7XG4gICAgICAgIHVucmVzb2x2ZWRSZWZzW2l0ZW0ua2V5XSA9IHtcbiAgICAgICAgICByb290OiBpdGVtLnJvb3QsXG4gICAgICAgICAgbG9jYXR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PCBwMi5sZW5ndGggLSAxOyBpKyspIHtcbiAgICAgICAgaWYoaSA+IDApIHsgcm9vdCArPSAnLyc7IH1cbiAgICAgICAgcm9vdCArPSBwMltpXTtcbiAgICAgIH1cbiAgICAgIHJvb3RUcmltbWVkID0gdHJ1ZTtcbiAgICB9XG4gICAgaWYocmVmLmluZGV4T2YoJyMnKSA+PSAwKSB7XG4gICAgICBpZihyZWYuaW5kZXhPZignLycpID09PSAwKSB7XG4gICAgICAgIHJzID0gcmVmLnNwbGl0KCcjJyk7XG4gICAgICAgIHAgID0gcm9vdC5zcGxpdCgnLy8nKTtcbiAgICAgICAgcDIgPSBwWzFdLnNwbGl0KCcvJyk7XG4gICAgICAgIHJvb3QgPSBwWzBdICsgJy8vJyArIHAyWzBdICsgcnNbMF07XG4gICAgICAgIGxvY2F0aW9uID0gcnNbMV07XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgcnMgPSByZWYuc3BsaXQoJyMnKTtcbiAgICAgICAgaWYocnNbMF0gIT09ICcnKSB7XG4gICAgICAgICAgcDIgPSByb290LnNwbGl0KCcvJyk7XG4gICAgICAgICAgcDIgPSBwMi5zbGljZSgwLCBwMi5sZW5ndGggLSAxKTtcbiAgICAgICAgICBpZighcm9vdFRyaW1tZWQpIHtcbiAgICAgICAgICAgIHJvb3QgPSAnJztcbiAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgcDIubGVuZ3RoOyBrKyspIHtcbiAgICAgICAgICAgICAgaWYoayA+IDApIHsgcm9vdCArPSAnLyc7IH1cbiAgICAgICAgICAgICAgcm9vdCArPSBwMltrXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgICAgcm9vdCArPSAnLycgKyByZWYuc3BsaXQoJyMnKVswXTtcbiAgICAgICAgfVxuICAgICAgICBsb2NhdGlvbiA9IHJzWzFdO1xuICAgICAgfVxuICAgIH1cbiAgICBpZiAocmVmLmluZGV4T2YoJ2h0dHAnKSA9PT0gMCkge1xuICAgICAgaWYocmVmLmluZGV4T2YoJyMnKSA+PSAwKSB7XG4gICAgICAgIHJvb3QgPSByZWYuc3BsaXQoJyMnKVswXTtcbiAgICAgICAgbG9jYXRpb24gPSByZWYuc3BsaXQoJyMnKVsxXTtcbiAgICAgIH1cbiAgICAgIGVsc2Uge1xuICAgICAgICByb290ID0gcmVmO1xuICAgICAgICBsb2NhdGlvbiA9ICcnO1xuICAgICAgfVxuICAgICAgcmVzb2x1dGlvblRhYmxlLnB1c2goe29iajogcHJvcGVydHksIHJlc29sdmVBczogJ2lubGluZScsIHJvb3Q6IHJvb3QsIGtleToga2V5LCBsb2NhdGlvbjogbG9jYXRpb259KTtcbiAgICB9IGVsc2UgaWYgKHJlZi5pbmRleE9mKCcjJykgPT09IDApIHtcbiAgICAgIGxvY2F0aW9uID0gcmVmLnNwbGl0KCcjJylbMV07XG4gICAgICByZXNvbHV0aW9uVGFibGUucHVzaCh7b2JqOiBwcm9wZXJ0eSwgcmVzb2x2ZUFzOiAnaW5saW5lJywgcm9vdDogcm9vdCwga2V5OiBrZXksIGxvY2F0aW9uOiBsb2NhdGlvbn0pO1xuICAgIH0gZWxzZSBpZiAocmVmLmluZGV4T2YoJy8nKSA9PT0gMCAmJiByZWYuaW5kZXhPZignIycpID09PSAtMSkge1xuICAgICAgbG9jYXRpb24gPSByZWY7XG4gICAgICB2YXIgbWF0Y2hlcyA9IHJvb3QubWF0Y2goL15odHRwcz9cXDpcXC9cXC8oW15cXC8/I10rKSg/OltcXC8/I118JCkvaSk7XG4gICAgICBpZihtYXRjaGVzKSB7XG4gICAgICAgIHJvb3QgPSBtYXRjaGVzWzBdICsgcmVmLnN1YnN0cmluZygxKTtcbiAgICAgICAgbG9jYXRpb24gPSAnJztcbiAgICAgIH1cbiAgICAgIHJlc29sdXRpb25UYWJsZS5wdXNoKHtvYmo6IHByb3BlcnR5LCByZXNvbHZlQXM6ICdpbmxpbmUnLCByb290OiByb290LCBrZXk6IGtleSwgbG9jY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mW2ldO1xuICAgICAgICAgIHZhciBzb3VyY2UgPSAnc2VsZic7XG4gICAgICAgICAgaWYodHlwZW9mIGNvbXBvbmVudFsneC1yZXNvbHZlZC1mcm9tJ10gIT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICBzb3VyY2UgPSBjb21wb25lbnRbJ3gtcmVzb2x2ZWQtZnJvbSddWzBdO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGZvcih2YXIgcGFydCBpbiBjb21wb25lbnQpIHtcbiAgICAgICAgICAgIGlmKCFvdXRwdXQuaGFzT3duUHJvcGVydHkocGFydCkpIHtcbiAgICAgICAgICAgICAgb3V0cHV0W3BhcnRdID0gXy5jbG9uZURlZXAoY29tcG9uZW50W3BhcnRdKTtcbiAgICAgICAgICAgICAgaWYocGFydCA9PT0gJ3Byb3BlcnRpZXMnKSB7XG4gICAgICAgICAgICAgICAgZm9yKG5hbWUgaW4gb3V0cHV0W3BhcnRdKSB7XG4gICAgICAgICAgICAgICAgICBvdXRwdXRbcGFydF1bbmFtZV1bJ3gtcmVzb2x2ZWQtZnJvbSddID0gc291cmNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgIGlmKHBhcnQgPT09ICdwcm9wZXJ0aWVzJykge1xuICAgICAgICAgICAgICAgIHZhciBwcm9wZXJ0aWVzID0gY29tcG9uZW50W3BhcnRdO1xuICAgICAgICAgICAgICAgIGZvcihuYW1lIGluIHByb3BlcnRpZXMpIHtcbiAgICAgICAgICAgICAgICAgIG91dHB1dC5wcm9wZXJ0aWVzW25hbWVdID0gXy5jbG9uZURlZXAocHJvcGVydGllc1tuYW1lXSk7XG4gICAgICAgICAgICAgICAgICB2YXIgcmVzb2x2ZWRGcm9tID0gcHJvcGVydGllc1tuYW1lXVsneC1yZXNvbHZlZC1mcm9tJ107XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHJlc29sdmVkRnJvbSA9PT0gJ3VuZGVmaW5lZCcgfHwgcmVzb2x2ZWRGcm9tID09PSAnc2VsZicpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRGcm9tID0gc291cmNlO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgb3V0cHV0LnByb3BlcnRpZXNbbmFtZV1bJ3gtcmVzb2x2ZWQtZnJvbSddID0gcmVzb2x2ZWRGcm9tO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICBlbHNlIGlmKHBhcnQgPT09ICdyZXF1aXJlZCcpIHtcbiAgICAgICAgICAgICAgICAvLyBtZXJnZSAmIGRlZHVwIHRoZSByZXF1aXJlZCBhcnJheVxuICAgICAgICAgICAgICAgIHZhciBhID0gb3V0cHV0LnJlcXVpcmVkLmNvbmNhdChjb21wb25lbnRbcGFydF0pO1xuICAgICAgICAgICAgICAgIGZvcih2YXIgayA9IDA7IGsgPCBhLmxlbmd0aDsgKytrKSB7XG4gICAgICAgICAgICAgICAgICBmb3IodmFyIGogPSBrICsgMTsgaiA8IGEubGVuZ3RoOyArK2opIHtcbiAgICAgICAgICAgICAgICAgICAgaWYoYVtrXSA9PT0gYVtqXSkgeyBhLnNwbGljZShqLS0sIDEpOyB9XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG91dHB1dC5yZXF1aXJlZCA9IGE7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgZWxzZSBpZihwYXJ0ID09PSAneC1yZXNvbHZlZC1mcm9tJykge1xuICAgICAgICAgICAgICAgIG91dHB1dFsneC1yZXNvbHZlZC1mcm9tJ10ucHVzaChzb3VyY2UpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIFRPRE86IG5lZWQgdG8gbWVyZ2UgdGhpcy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ICB9XG5cbiAgICAgICAgICAgIGh0bWwgKz0gcHJpbWl0aXZlVG9IVE1MKGNQcm9wZXJ0eSk7XG5cbiAgICAgICAgICAgIGlmKCFwcm9wZXJ0eUlzUmVxdWlyZWQpIHtcbiAgICAgICAgICAgICAgaHRtbCArPSAnLCA8c3BhbiBjbGFzcz1cInByb3BPcHRLZXlcIj5vcHRpb25hbDwvc3Bhbj4nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZihwcm9wZXJ0eS5yZWFkT25seSkge1xuICAgICAgICAgICAgICAgIGh0bWwgKz0gJywgPHNwYW4gY2xhc3M9XCJwcm9wUmVhZE9ubHlcIj5yZWFkIG9ubHk8L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaHRtbCArPSAnKSc7XG5cbiAgICAgICAgICAgIGlmICghXy5pc1VuZGVmaW5lZChwcm9wRGVzY3JpcHRpb24pKSB7XG4gICAgICAgICAgICAgIGh0bWwgKz0gJzogJyArICc8c3BhbiBjbGFzcz1cInByb3BEZXNjXCI+JyArIHByb3BEZXNjcmlwdGlvbiArICc8L3NwYW4+JztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGNQcm9wZXJ0eS5lbnVtKSB7XG4gICAgICAgICAgICAgIGh0bWwgKz0gJyA9IDxzcGFuIGNsYXNzPVwicHJvcFZhbHNcIj5bXFwnJyArIGNQcm9wZXJ0eS5lbnVtLmpvaW4oJ1xcJywgXFwnJykgKyAnXFwnXTwvc3Bhbj4nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gJzxkaXYnICsgKHByb3BlcnR5LnJlYWRPbmx5ID8gJyBjbGFzcz1cInJlYWRPbmx5XCInIDogJycpICsgJz4nICsgcHJpbWl0aXZlVG9PcHRpb25zSFRNTChjUHJvcGVydHksIGh0bWwpO1xuICAgICAgICAgIH0pLmpvaW4oJyw8L2Rpdj4nKTtcblxuICAgICAgICAgIGlmIChjb250ZW50cyk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5Jykge1xuICAgICAgICBzZWN1cml0eURlZmluaXRpb24udHlwZSA9ICdhcGlLZXknO1xuICAgICAgICBzZWN1cml0eURlZmluaXRpb24uaW4gPSBkZWZpbml0aW9uLnBhc3NBcztcbiAgICAgICAgc2VjdXJpdHlEZWZpbml0aW9uLm5hbWUgPSBkZWZpbml0aW9uLmtleW5hbWUgfHwgbmFtZTtcbiAgICAgICAgaXNWYWxpZCA9IHRydWU7XG4gICAgICB9XG4gICAgICBlbHNlIGlmKGRlZmluaXRpb24udHlwZSA9PT0gJ2Jhc2ljQXV0aCcpIHtcbiAgICAgICAgc2VjdXJpdHlEZWZpbml0aW9uLnR5cGUgPSAnYmFzaWNBdXRoJztcbiAgICAgICAgaXNWYWxpZCA9IHRydWU7XG4gICAgICB9XG4gICAgICBlbHNlIGlmKGRlZmluaXRpb24udHlwZSA9PT0gJ29hdXRoMicpIHtcbiAgICAgICAgdmFyIGV4aXN0aW5nU2NvcGVzID0gZGVmaW5pdGlvbi5zY29wZXMgfHwgW107XG4gICAgICAgIHZhciBzY29wZXMgPSB7fTtcbiAgICAgICAgdmFyIGk7XG4gICAgICAgIGZvcihpIGluIGV4aXN0aW5nU2NvcGVzKSB7XG4gICAgICAgICAgdmFyIHNjb3BlID0gZXhpc3RpbmdTY29wZXNbaV07XG4gICAgICAgICAgc2NvcGVzW3Njb3BlLnNjb3BlXSA9IHNjb3BlLmRlc2NyaXB0aW9uO1xuICAgICAgICB9XG4gICAgICAgIHNlY3VyaXR5RGVmaW5pdGlvbi50eXBlID0gJ29hdXRoMic7XG4gICAgICAgIGlmKGkgPiAwKSB7XG4gICAgICAgICAgc2VjdXJpdHlEZWZpbml0aW9uLnNjb3BlcyA9IHNjb3BlcztcbiAgICAgICAgfVxuICAgICAgICBpZihkZWZpbml0aW9uLmdyYW50VHlwZXMpIHtcbiAgICAgICAgICBpZihkZWZpbml0aW9uLmdyYW50VHlwZXMuaW1wbGljaXQpIHtcbiAgICAgICAgICAgIHZhciBpbXBsa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CRVxuICBhcnIucmVhZEludDMyTEUgPSBCUC5yZWFkSW50MzJMRVxuICBhcnIucmVhZEludDMyQkUgPSBCUC5yZWFkSW50MzJCRVxuICBhcnIucmVhZEZsb2F0TEUgPSBCUC5yZWFkRmxvYXRMRVxuICBhcnIucmVhZEZsb2F0QkUgPSBCUC5yZWFkRmxvYXRCRVxuICBhcnIucmVhZERvdWJsZUxFID0gQlAucmVhZERvdWJsZUxFXG4gIGFyci5yZWFkRG91YmxlQkUgPSBCUC5yZWFkRG91YmxlQkVcbiAgYXJyLndyaXRlVUludDggPSBCUC53cml0ZVVJbnQ4XG4gIGFyci53cml0ZVVJbnRMRSA9IEJQLndyaXRlVUludExFXG4gIGFyci53cml0ZVVJbnRCRSA9IEJQLndyaXRlVUludEJFXG4gIGFyci53cml0ZVVJbnQxNkxFID0gQlAud3JpdGVVSW50MTZMRVxuICBhcnIud3JpdGVVSW50MTZCRSA9IEJQLndyaXRlVUludDE2QkVcbiAgYXJyLndyaXRlVUludDMyTEUgPSBCUC53cml0ZVVJbnQzMkxFXG4gIGFyci53cml0ZVVJbnQzMkJFID0gQlAud3JpdGVVSW50MzJCRVxuICBhcnIud3JpdGVJbnRMRSA9IEJQLndyaXRlSW50TEVcbiAgYXJyLndyaXRlSW50QkUgPSBCUC53cml0ZUludEJFXG4gIGFyci53cml0ZUludDggPSBCUC53cml0ZUludDhcbiAgYXJyLndyaXRlSW50MTZMRSA9IEJQLndyaXRlSW50MTZMRVxuICBhcnIud3JpdGVJbnQxNkJFID0gQlAud3JpdGVJbnQxNkJFXG4gIGFyci53cml0ZUludDMyTEUgPSBCUC53cml0ZUludDMyTEVcbiAgYXJyLndyaXRlSW50MzJCRSA9IEJQLndyaXRlSW50MzJCRVxuICBhcnIud3JpdGVGbG9hdExFID0gQlAud3JpdGVGbG9hdExFXG4gIGFyci53cml0ZUZsb2F0QkUgPSBCUC53cml0ZUZsb2F0QkVcbiAgYXJyLndyaXRlRG91YmxlTEUgPSBCUC53cml0Z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ID0gISFzY3JpcHQ7XG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IENvb2tpZUFjY2Vzc0luZm8oZG9tYWluLCBwYXRoLCBzZWN1cmUsIHNjcmlwdCk7XG4gICAgfVxuICAgIGV4cG9ydHMuQ29va2llQWNjZXNzSW5mbyA9IENvb2tpZUFjY2Vzc0luZm87XG5cbiAgICBmdW5jdGlvbiBDb29raWUoY29va2llc3RyLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKSB7XG4gICAgICAgIGlmIChjb29raWVzdHIgaW5zdGFuY2VvZiBDb29raWUpIHtcbiAgICAgICAgICAgIHJldHVybiBjb29raWVzdHI7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMgaW5zdGFuY2VvZiBDb29raWUpIHtcbiAgICAgICAgICAgIHRoaXMubmFtZSA9IG51bGw7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gbnVsbDtcbiAgICAgICAgICAgIHRoaXMuZXhwaXJhdGlvbl9kYXRlID0gSW5maW5pdHk7XG4gICAgICAgICAgICB0aGlzLnBhdGggPSBTdHJpbmcocmVxdWVzdF9wYXRoIHx8IFwiL1wiKTtcbiAgICAgICAgICAgIHRoaXMuZXhwbGljaXRfcGF0aCA9IGZhbHNlO1xuICAgICAgICAgICAgdGhpcy5kb21haW4gPSByZXF1ZXN0X2RvbWFpbiB8fCBudWxsO1xuICAgICAgICAgICAgdGhpcy5leHBsaWNpdF9kb21haW4gPSBmYWxzZTtcbiAgICAgICAgICAgIHRoaXMuc2VjdXJlID0gZmFsc2U7IC8vaG93IHRvIGRlZmluZSBkZWZhdWx0P1xuICAgICAgICAgICAgdGhpcy5ub3NjcmlwdCA9IGZhbHNlOyAvL2h0dHBvbmx5XG4gICAgICAgICAgICBpZiAoY29va2llc3RyKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wYXJzZShjb29raWVzdHIsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG5ldyBDb29raWUoY29va2llc3RyLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKTtcbiAgICB9XG4gICAgZXhwb3J0cy5Db29raWUgPSBDb29raWU7XG5cbiAgICBDb29raWUucHJvdG90eXBlLnRvU3RyaW5nID0gZnVuY3Rpb24gdG9TdHJpbmcoKSB7XG4gICAgICAgIHZhciBzdHIgPSBbdGhpcy5uYW1lICsgXCI9XCIgKyB0aGlzLnZhbHVlXTtcbiAgICAgICAgaWYgKHRoaXMuZXhwaXJhdGlvbl9kYXRlICE9PSBJbmZpbml0eSkge1xuICAgICAgICAgICAgc3RyLnB1c2goXCJleHBpcmVzPVwiICsgKG5ldyBEYXRlKHRoaXMuZXhwaXJhdGlvbl9kYXRlKSkudG9HTVRTdHJpbmcoKSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZG9tYWluKSB7XG4gICAgICAgICAgICBzdHIucHVzaChcImRvbWFpbj1cIiArIHRoaXMuZG9tYWluKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodGhpcy5wYXRoKSB7XG4gICAgICAgICAgICBzdHIucHVzaChcInBhdGg9XCIgKyB0aGlzLnBhdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmICh0aGlzLnNlY3VyZSkge1xuICAgICAgICAgICAgc3RyLnB1c2goXCJzZWN1cmVcIik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMubm9zY3JpcHQpIHtcbiAgICAgICAgICAgIHN0ci5wdXNoKFwiaHR0cG9ubHlcIik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHN0ci5qb2luKFwiOyBcIik7XG4gICAgfTtcblxuICAgIENvb2tpZS5wcm90b3R5cGUudG9WYWx1ZVN0cmluZyA9IGZ1bmN0aW9uIHRvVmFsdWVTdHJpbmcoKSB7XG4gICAgICAgIHJldHVybiB0aGlzLm5hbWUgKyBcIj1cIiArIHRoaXMudmFsdWU7XG4gICAgfTtcblxuICAgIHZhciBjb29raWVfc3RyX3NwbGl0dGVyID0gL1s6XSg/PVxccypbYS16QS1aMC05X1xcLV0rXFxzKls9XSkvZztcbiAgICBDb29raWUucHJvdG90eXBlLnBhcnNlID0gZnVuY3Rpb24gcGFyc2Uoc3RyLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKSB7XG4gICAgICAgIGlmICh0aGlzIGluc3RhbmNlb2YgQ29va2llKSB7XG4gICAgICAgICAgICB2YXIgcGFydHMgPSBzdHIuc3BsaXQoXCI7XCIpLmZpbHRlcihmdW5jdGlvbiAodmFsdWUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICEhdmFsdWU7XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgcGFpciA9IHBhcnRzWzBdLm1hdGNoKC8oW149XSspPShbXFxzXFxTXSopLyksXG4gICAgICAgICAgICAgICAga2V5ID0gcGFpclsxXSxcbiAgICAgICAgICAgICAgICB2YWx1ZSA9IHBhaXJbMl0sXG4gICAgICAgICAgICAgICAgaTtcbiAgICAgICAgICAgIHRoaXMubmFtZSA9IGtleTtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2YWx1ZTtcblxuICAgICAgICAgICAgZm9yIChpID0gMTsgaSA8IHBhcnRzLmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgcGFpciA9IHBhcnRzW2ldLm1hdGNoKC8oW149XSspKD86PShbXFxzXFxTXSopKT8vKTtcbiAgICAgICAgICAgICAgICBrZXkgPSBwYWlyWzFdLnRyaW0oKS50b0xvd2VyQ2FzZSgpO1xuICAgICAgICAgICAgICAgIHZhbHVlID0gcGFpclsyXTtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGtleSkge1xuICAgICAgICAgICAgICAgIGNhc2UgXCJodHRwb25seVwiOlxuICAgICAgICAgICAgICAgICAgICB0aGlzLm5vc2NyaXB0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSBcImV4cGlyZXNcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5leHBpcmF0aW9uX2RhdGUgPSB2YWx1ZSA/XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTnVtYmVyKERhdGUucGFyc2UodmFsdWUpKSA6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5maW5pdHk7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJwYXRoXCI6XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGF0aCA9IHZhbHVlID9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZS50cmltKCkgOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwiXCI7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXhwbGljaXRfcGF0aCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJkb21haW5cIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5kb21haW4gPSB2YWx1ZSA/XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUudHJpbSgpIDpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcIlwiO1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmV4cGxpY2l0X2RvbWFpbiA9ICEhdGhpcy5kb21haW47XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgXCJzZWN1cmVcIjpcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWN1cmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICghdGhpcy5leHBsaWNpdF9wYXRoKSB7XG4gICAgICAgICAgICAgICB0aGlzLnBhdGggPSByZXF1ZXN0X3BhdGggfHwgXCIvXCI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXRoaXMuZXhwbGljaXRfZG9tYWluKSB7XG4gICAgICAgICAgICAgICB0aGlzLmRvbWFpbiA9IHJlcXVlc3RfZG9tYWluO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IENvb2tpZSgpLnBhcnNlKHN0ciwgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCk7XG4gICAgfTtcblxuICAgIENvb2tpZS5wcm90b3R5cGUubWF0Y2hlcyA9IGZ1bmN0aW9uIG1hdGNoZXMoYWNjZXNzX2luZm8pIHtcbiAgICAgICAgaWYgKHRoaXMubm9zY3JpcHQgJiYgYWNjZXNzX2luZm8uc2NyaXB0IHx8XG4gICAgICAgICAgICAgICAgdGhpcy5zZWN1cmUgJiYgIWFjY2Vzc19pbmZvLnNlY3VyZSB8fFxuICAgICAgICAgICAgICAgICF0aGlzLmNvbGxpZGVzV2l0aChhY2Nlc3NfaW5mbykpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9O1xuXG4gICAgQ29va2llLnByb3RvdHlwZS5jb2xsaWRlc1dpdGggPSBmdW5jdGlvbiBjb2xsaWRlc1dpdGgoYWNjZXNzX2luZm8pIHtcbiAgICAgICAgaWYgKCh0aGlzLnBhdGggJiYgIWFjY2Vzc19pbmZvLnBhdGgpIHx8ICh0aGlzLmRvbWFpbiAmJiAhYWNjZXNzX2luZm8uZG9tYWluKSkge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgI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1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfTtcblxuICAgIGZ1bmN0aW9uIENvb2tpZUphcigpIHtcbiAgICAgICAgdmFyIGNvb2tpZXMsIGNvb2tpZXNfbGlzdCwgY29sbGlkYWJsZV9jb29raWU7XG4gICAgICAgIGlmICh0aGlzIGluc3RhbmNlb2YgQ29va2llSmFyKSB7XG4gICAgICAgICAgICBjb29raWVzID0gT2JqZWN0LmNyZWF0ZShudWxsKTsgLy9uYW1lOiBbQ29va2llXVxuXG4gICAgICAgICAgICB0aGlzLnNldENvb2tpZSA9IGZ1bmN0aW9uIHNldENvb2tpZShjb29raWUsIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpIHtcbiAgICAgICAgICAgICAgICB2YXIgcmVtb3ZlLCBpO1xuICAgICAgICAgICAgICAgIGNvb2tpZSA9IG5ldyBDb29raWUoY29va2llLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKTtcbiAgICAgICAgICAgICAgICAvL0RlbGV0ZSB0aGUgY29va2llIGlmIHRoZSBzZXQgaXMgcGFzdCB0aGUgY3VycmVudCB0aW1lXG4gICAgICAgICAgICAgICAgcmVtb3ZlID0gY29va2llLmV4cGlyYXRpb25fZGF0ZSA8PSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgIGlmIChjb29raWVzW2Nvb2tpZS5uYW1lXSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZXNfbGlzdCA9IGNvb2tpZXNbY29va2llLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgY29va2llc19saXN0Lmxlbmd0aDsgaSArPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xsaWRhYmxlX2Nvb2tpZSA9IGNvb2tpZXNfbGlzdFtpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb2xsaWRhYmxlX2Nvb2tpZS5jb2xsaWRlc1dpdGgoY29va2llKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZW1vdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llc19saXN0LnNwbGljZShpLCAxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvb2tpZXNfbGlzdC5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBjb29raWVzW2Nvb2tpZS5uYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvb2tpZXNfbGlzdFtpXSA9IGNvb2tpZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZW1vdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb29raWVzX2xpc3QucHVzaChjb29raWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29va2llO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAocmVtb3ZlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29va2llc1tjb29raWUubmFtZV0gPSBbY29va2llXTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29va2llc1tjb29raWUubmFtZV07XG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgLy9yZXR1cm5zIGEgY29va2llXG4gICAgICAgICAgICB0aGlzLmdldENvb2tpZSA9IGZ1bmN0aW9uIGdldENvb2tpZShjb29raWVfbmFtZSwgYWNjZXNzX2luZm8pIHtcbiAgICAgICAgICAgICAgICB2YXIgY29va2llLCBpO1xuICAgICAgICAgICAgICAgIGNvb2tpZXNfbGlzdCA9IGNvb2tpZXNbY29va2llX25hbWVdO1xuICAgICAgICAgICAgICAgIGlmICghY29va2llc19saXN0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvb2tpZXNfbGlzdC5sZW5ndGg7IGkgKz0gMSkge1xuICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBjb29raWVzX2xpc3RbaV07XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUuZXhwaXJhdGlvbl9kYXRlIDw9IERhdGUubm93KCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb29raWVzX2xpc3QubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvb2tpZXNbY29va2llLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICBpZiAoY29va2llLm1hdGNoZXMoYWNjZXNzX2luZm8pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29va2llO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIC8vcmV0dXJucyBhIGxpc3Qgb2YgY29va2llc1xuICAgICAgICAgICAgdGhpcy5nZXRDb29raWVzID0gZnVuY3Rpb24gZ2V0Q29va2llcyhhY2Nlc3NfaW5mbykge1xuICAgICAgICAgICAgICAgIHZhciBtYXRjaGVzID0gW10sIGNvb2tpZV9uYW1lLCBjb29raWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb29raWVfbmFtZSBpbiBjb29raWVzKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvb2tpZSA9IHRoaXMuZ2V0Q29va2llKGNvb2tpZV9uYW1lLCBhY2Nlc3NfaW5mbyk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChjb29raWUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoZXMucHVzaChjb29raWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG1hdGNoZXMudG9TdHJpbmcgPSBmdW5jdGlvbiB0b1N0cmluZygpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoZXMuam9pbihcIjpcIik7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICBtYXRjaGVzLnRvVmFsdWVTdHJpbmcgPSBmdW5jdGlvbiB0b1ZhbHVlU3RyaW5nKCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWF0Y2hlcy5tYXAoZnVuY3Rpb24gKGMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjLnRvVmFsdWVTdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgfSkuam9pbignOycpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoZXM7XG4gICAgICAgICAgICB9O1xuXG4gICAgICAgICAgICByZXR1cm4gdGhpcztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbmV3IENvb2tpZUphcigpO1xuICAgIH1cbiAgICBleHBvcnRzLkNvb2tpZUphciA9IENvb2tpZUphcjtcblxuICAgIC8vcmV0dXJucyBsaXN0IG9mIGNvb2tpZXMgdGhhdCB3ZXJlIHNldCBjb3JyZWN0bHkuIENvb2tpZXMgdGhhdCBhcmUgZXhwaXJlZCBhbmQgcmVtb3ZlZCBhcmUgbm90IHJldHVybmVkLlxuICAgIENvb2tpZUphci5wcm90b3R5cGUuc2V0Q29va2llcyA9IGZ1bmN0aW9uIHNldENvb2tpZXMoY29va2llcywgcmVxdWVzdF9kb21haW4sIHJlcXVlc3RfcGF0aCkge1xuICAgICAgICBjb29raWVzID0gQXJyYXkuaXNBcnJheShjb29raWVzKSA/XG4gICAgICAgICAgICAgICAgY29va2llcyA6XG4gICAgICAgICAgICAgICAgY29va2llcy5zcGxpdChjb29raWVfc3RyX3NwbGl0dGVyKTtcbiAgICAgICAgdmFyIHN1Y2Nlc3NmdWwgPSBbXSxcbiAgICAgICAgICAgIGksXG4gICAgICAgICAgICBjb29raWU7XG4gICAgICAgIGNvb2tpZXMgPSBjb29raWVzLm1hcChmdW5jdGlvbihpdGVtKXtcbiAgICAgICAgICAgIHJldHVybiBuZXcgQ29va2llKGl0ZW0sIHJlcXVlc3RfZG9tYWluLCByZXF1ZXN0X3BhdGgpO1xuICAgICAgICB9KTtcbiAgICAgICAgZm9yIChpID0gMDsgaSA8IGNvb2tpZXMubGVuZ3RoOyBpICs9IDEpIHtcbiAgICAgICAgICAgIGNvb2tpZSA9IGNvb2tpZXNbaV07XG4gICAgICAgICAgICBpZiAodGhpcy5zZXRDb29raWUoY29va2llLCByZXF1ZXN0X2RvbWFpbiwgcmVxdWVzdF9wYXRoKSkge1xuICAgICAgICAgICAgICAgIHN1Y2Nlc3NmdWwucHVzaChjb29raWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBzdWNjZXNzZnVsO1xuICAgIH07XG59KCkpO1xuIiwiJ3VzZSBzdHJpY3QnO1xuXG5cbnZhciB5YW1sID0gcmVxdWlyZSgnLi9saWIvanMteWFtbC5qcycpO1xuXG5cbm1vZHVsZS5leHBvcnRzID0geWFtbDtcbiI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ZS50b1N0cmluZztcbnZhciBfaGFzT3duUHJvcGVydHkgPSBPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5O1xuXG52YXIgQ0hBUl9UQUIgICAgICAgICAgICAgICAgICA9IDB4MDk7IC8qIFRhYiAqL1xudmFyIENIQVJfTElORV9GRUVEICAgICAgICAgICAgPSAweDBBOyAvKiBMRiAqL1xudmFyIENIQVJfQ0FSUklBR0VfUkVUVVJOICAgICAgPSAweDBEOyAvKiBDUiAqL1xudmFyIENIQVJfU1BBQ0UgICAgICAgICAgICAgICAgPSAweDIwOyAvKiBTcGFjZSAqL1xudmFyIENIQVJfRVhDTEFNQVRJT04gICAgICAgICAgPSAweDIxOyAvKiAhICovXG52YXIgQ0hBUl9ET1VCTEVfUVVPVEUgICAgICAgICA9IDB4MjI7IC8qIFwiICovXG52YXIgQ0hBUl9TSEFSUCAgICAgICAgICAgICAgICA9IDB4MjM7IC8qICMgKi9cbnZhciBDSEFSX1BFUkNFTlQgICAgICAgICAgICAgID0gMHgyNTsgLyogJSAqL1xudmFyIENIQVJfQU1QRVJTQU5EICAgICAgICAgICAgPSAweDI2OyAvKiAmICovXG52YXIgQ0hBUl9TSU5HTEVfUVVPVEUgICAgICAgICA9IDB4Mjc7IC8qICcgKi9cbnZhciBDSEFSX0FTVEVSSVNLICAgICAgICAgICAgID0gMHgyQTsgLyogKiAqL1xudmFyIENIQVJfQ09NTUEgICAgICAgICAgICAgICAgPSAweDJDOyAvKiAsICovXG52YXIgQ0hBUl9NSU5VUyAgICAgICAgICAgICAgICA9IDB4MkQ7IC8qIC0gKi9cbnZhciBDSEFSX0NPTE9OICAgICAgICAgICAgICAgID0gMHgzQTsgLyogOiAqL1xudmFyIENIQVJfR1JFQVRFUl9USEFOICAgICAgICAgPSAweDNFOyAvKiA+ICovXG52YXIgQ0hBUl9RVUVTVElPTiAgICAgICAgICAgICA9IDB4M0Y7IC8qID8gKi9cbnZhciBDSEFSX0NPTU1FUkNJQUxfQVQgICAgICAg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yA6XG4gICAgICAgIChjID09PSAweDYyLyogYiAqLykgPyAnXFx4MDgnIDpcbiAgICAgICAgKGMgPT09IDB4NzQvKiB0ICovKSA/ICdcXHgwOScgOlxuICAgICAgICAoYyA9PT0gMHgwOS8qIFRhYiAqLykgPyAnXFx4MDknIDpcbiAgICAgICAgKGMgPT09IDB4NkUvKiBuICovKSA/ICdcXHgwQScgOlxuICAgICAgICAoYyA9PT0gMHg3Ni8qIHYgKi8pID8gJ1xceDBCJyA6XG4gICAgICAgIChjID09PSAweDY2LyogZiAqLykgPyAnXFx4MEMnIDpcbiAgICAgICAgKGMgPT09IDB4NzIvKiByICovKSA/ICdcXHgwRCcgOlxuICAgICAgICAoYyA9PT0gMHg2NS8qIGUgKi8pID8gJ1xceDFCJyA6XG4gICAgICAgIChjID09PSAweDIwLyogU3BhY2UgKi8pID8gJyAnIDpcbiAgICAgICAgKGMgPT09IDB4MjIvKiBcIiAqLykgPyAnXFx4MjInIDpcbiAgICAgICAgKGMgPT09IDB4MkYvKiAvICovKSA/ICcvJyA6XG4gICAgICAgIChjID09PSAweDVDLyogXFwgKi8pID8gJ1xceDVDJyA6XG4gICAgICAgIChjID09PSAweDRFLyogTiAqLykgPyAnXFx4ODUnIDpcbiAgICAgICAgKGMgPT09IDB4NUYvKiBfICovKSA/ICdcXHhBMCcgOlxuICAgICAgICAoYyA9PT0gMHg0Qy8qIEwgKi8pID8gJ1xcdTIwMjgnIDpcbiAgICAgICAgKGMgPT09IDB4NTAvKiBQICovKSA/ICdcXHUyMDI5JyA6ICcnO1xufVxuXG5mdW5jdGlvbiBjaGFyRnJvbUNvZGVwb2ludChjKSB7XG4gIGlmIChjIDw9IDB4RkZGRikge1xuICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKGMpO1xuICB9XG4gIC8vIEVuY29kZSBVVEYtMTYgc3Vycm9nYXRlIHBhaXJcbiAgLy8gaHR0cHM6Ly9lbi53aWtpcGVkaWEub3JnL3dpa2kvVVRGLTE2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gICAgICAgICAgICArIC8vIFsyXSBtb250aFxuICAnLShbMC05XVswLTldPyknICAgICAgICAgICAgICAgICAgICsgLy8gWzNdIGRheVxuICAnKD86KD86W1R0XXxbIFxcXFx0XSspJyAgICAgICAgICAgICAgKyAvLyAuLi5cbiAgJyhbMC05XVswLTldPyknICAgICAgICAgICAgICAgICAgICArIC8vIFs0XSBob3VyXG4gICc6KFswLTldWzAtOV0pJyAgICAgICAgICAgICAgICAgICAgKyAvLyBbNV0gbWludXRlXG4gICc6KFswLTldWzAtOV0pJyAgICAgICAgICAgICAgICAgICAgKyAvLyBbNl0gc2Vjb25kXG4gICcoPzpcXFxcLihbMC05XSopKT8nICAgICAgICAgICAgICAgICArIC8vIFs3XSBmcmFjdGlvblxuICAnKD86WyBcXFxcdF0qKFp8KFstK10pKFswLTldWzAtOV0/KScgKyAvLyBbOF0gdHogWzldIHR6X3NpZ24gWzEwXSB0el9ob3VyXG4gICcoPzo6KFswLTldWzAtOV0pKT8pKT8pPyQnKTsgICAgICAgICAvLyBbMTFdIHR6X21pbnV0ZVxuXG5mdW5jdGlvbiByZXNvbHZlWWFtbFRpbWVzdGFtcChkYXRhKSB7XG4gIGlmIChkYXRhID09PSBudWxsKSByZXR1cm4gZmFsc2U7XG4gIGlmIChZQU1MX1RJTUVTVEFNUF9SRUdFWFAuZXhlYyhkYXRhKSA9PT0gbnVsbCkgcmV0dXJuIGZhbHNlO1xuICByZXR1cm4gdHJ1ZTtcbn1cblxuZnVuY3Rpb24gY29uc3RydWN0WWFtbFRpbWVzdGFtcChkYXRhKSB7XG4gIHZhciBtYXRjaCwgeWVhciwgbW9udGgsIGRheSwgaG91ciwgbWludXRlLCBzZWNvbmQsIGZyYWN0aW9uID0gMCxcbiAgICAgIGRlbHRhID0gbnVsbCwgdHpfaG91ciwgdHpfbWludXRlLCBkYXRlO1xuXG4gIG1hdGNoID0gWUFNTF9USU1FU1RBTVBfUkVHRVhQLmV4ZWMoZGF0YSk7XG5cbiAgaWYgKG1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gICAvLyBydW5zIGEgc2luZ2xlIGZ1bmN0aW9uIGluIHRoZSBhc3luYyBxdWV1ZVxuICAgIGZ1bmN0aW9uIHJ1blNpbmdsZSh0YXNrLCBkb21haW4pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIHRhc2soKTtcblxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBpZiAoaXNOb2RlSlMpIHtcbiAgICAgICAgICAgICAgICAvLyBJbiBub2RlLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBjb25zaWRlcmVkIGZhdGFsIGVycm9ycy5cbiAgICAgICAgICAgICAgICAvLyBSZS10aHJvdyB0aGVtIHN5bmNocm9ub3VzbHkgdG8gaW50ZXJydXB0IGZsdXNoaW5nIVxuXG4gICAgICAgICAgICAgICAgLy8gRW5zdXJlIGNvbnRpbnVhdGlvbiBpZiB0aGUgdW5jYXVnaHQgZXhjZXB0aW9uIGlzIHN1cHByZXNzZWRcbiAgICAgICAgICAgICAgICAvLyBsaXN0ZW5pbmcgXCJ1bmNhdWdodEV4Y2VwdGlvblwiIGV2ZW50cyAoYXMgZG9tYWlucyBkb2VzKS5cbiAgICAgICAgICAgICAgICAvLyBDb250aW51ZSBpbiBuZXh0IGV2ZW50IHRvIGF2b2lkIHRpY2sgcmVjdXJzaW9uLlxuICAgICAgICAgICAgICAgIGlmIChkb21haW4pIHtcbiAgICAgICAgICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc2V0VGltZW91dChmbHVzaCwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgICAgICAgICBkb21haW4uZW50ZXIoKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB0aHJvdyBlO1xuXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIC8vIEluIGJyb3dzZXJzLCB1bmNhdWdodCBleGNlcHRpb25zIGFyZSBub3QgZmF0YWwuXG4gICAgICAgICAgICAgICAgLy8gUmUtdGhyb3cgdGhlbSBhc3luY2hyb25vdXNseSB0byBhdm9pZCBzbG93LWRvd25zLlxuICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24gKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBlO1xuICAgICAgICAgICAgICAgIH0sIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGRvbWFpbikge1xuICAgICAgICAgICAgZG9tYWluLmV4aXQoKTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIG5leHRUaWNrID0gZnVuY3Rpb24gKHRhc2spIHtcbiAgICAgICAgdGFpbCA9IHRhaWwubmV4dCA9IHtcbiAgICAgICAgICAgIHRhc2s6IHRhc2ssXG4gICAgICAgICAgICBkb21haW46IGlzTm9kZUpTICYmIHByb2Nlc3MuZG9tYWluLFxuICAgICAgICAgICAgbmV4dDogbnVsbFxuICAgICAgICB9O1xuXG4gICAgICAgIGlmICghZmx1c2hpbmcpIHtcbiAgICAgICAgICAgIGZsdXNoaW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHJlcXVlc3RUaWNrKCk7XG4gICAgICAgIH1cbiAgICB9O1xuXG4gICAgaWYgKHR5cGVvZiBwcm9jZXNzID09PSBcIm9iamVjdFwiICYmXG4gICAgICAgIHByb2Nlc3MudG9TdHJpbmcoKSA9PT0gXCJbb2JqZWN0IHByb2Nlc3NdXCIgJiYgcHJvY2Vzcy5uZXh0VGljaykge1xuICAgICAgICAvLyBFbnN1cmUgUSBpcyBpbiBhIHJlYWwgTm9kZSBlbnZpcm9ubWVudCwgd2l0aCBhIGBwcm9jZXNzLm5leHRUaWNrYC5cbiAgICAgICAgLy8gVG8gc2VlIHRocm91Z2ggZmFrZSBOb2RlIGVudmlyb25tZW50czpcbiAgICAgICAgLy8gKiBNb2NoYSB0ZXN0IHJ1bm5lciA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gICAgICAgIGxlbmd0aCA9IHRoaXMubGVuZ3RoO1xuICAgICAgICAvLyBjb25jZXJuaW5nIHRoZSBpbml0aWFsIHZhbHVlLCBpZiBvbmUgaXMgbm90IHByb3ZpZGVkXG4gICAgICAgIGlmIChhcmd1bWVudHMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAvLyBzZWVrIHRvIHRoZSBmaXJzdCB2YWx1ZSBpbiB0aGUgYXJyYXksIGFjY291bnRpbmdcbiAgICAgICAgICAgIC8vIGZvciB0aGUgcG9zc2liaWxpdHkgdGhhdCBpcyBpcyBhIHNwYXJzZSBhcnJheVxuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChpbmRleCBpbiB0aGlzKSB7XG4gICAgICAgICAgICAgICAgICAgIGJhc2lzID0gdGhpc1tpbmRleCsrXTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgrK2luZGV4ID49IGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAoMSk7XG4gICAgICAgIH1cbiAgICAgICAgLy8gcmVkdWNlXG4gICAgICAgIGZvciAoOyBpbmRleCA8IGxlbmd0aDsgaW5kZXgrKykge1xuICAgICAgICAgICAgLy8gYWNjb3VudCBmb3IgdGhlIHBvc3NpYmlsaXR5IHRoYXQgdGhlIGFycmF5IGlzIHNwYXJzZVxuICAgICAgICAgICAgaWYgKGluZGV4IGluIHRoaXMpIHtcbiAgICAgICAgICAgICAgICBiYXNpcyA9IGNhbGxiYWNrKGJhc2lzLCB0aGlzW2luZGV4XSwgaW5kZXgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiBiYXNpcztcbiAgICB9XG4pO1xuXG52YXIgYXJyYXlfaW5kZXhPZiA9IHV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VsZik7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiByZWplY3RlZChleGNlcHRpb24pO1xuICAgICAgICAgICAgfSBjYXRjaCAobmV3RXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJlamVjdChuZXdFeGNlcHRpb24pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICB9XG5cbiAgICBmdW5jdGlvbiBfcHJvZ3Jlc3NlZCh2YWx1ZSkge1xuICAgICAgICByZXR1cm4gdHlwZW9mIHByb2dyZXNzZWQgPT09IFwiZnVuY3Rpb25cIiA/IHByb2dyZXNzZWQodmFsdWUpIDogdmFsdWU7XG4gICAgfVxuXG4gICAgUS5uZXh0VGljayhmdW5jdGlvbiAoKSB7XG4gICAgICAgIHNlbGYucHJvbWlzZURpc3BhdGNoKGZ1bmN0aW9uICh2YWx1ZSkge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfZnVsZmlsbGVkKHZhbHVlKSk7XG4gICAgICAgIH0sIFwid2hlblwiLCBbZnVuY3Rpb24gKGV4Y2VwdGlvbikge1xuICAgICAgICAgICAgaWYgKGRvbmUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBkb25lID0gdHJ1ZTtcblxuICAgICAgICAgICAgZGVmZXJyZWQucmVzb2x2ZShfcmVqZWN0ZWQoZXhjZXB0aW9uKSk7XG4gICAgICAgIH1dKTtcbiAgICB9KTtcblxuICAgIC8vIFByb2dyZXNzIHByb3BhZ2F0b3IgbmVlZCB0byBiZSBhdHRhY2hlZCBpbiB0aGUgY3VycmVudCB0aWNrLlxuICAgIHN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HRvIG1ha2UgaXQgcG9zc2libGUgdG8gdXNlIGdlbmVyYXRvcnMgaW4gZGVwbG95ZWQgYnJvd3NlcnMsIHNvXG4gICAgICAgICAgICAvLyB3ZSBhbHNvIHN1cHBvcnQgUHl0aG9uLXN0eWxlIGdlbmVyYXRvcnMuICBBdCBzb21lIHBvaW50IHdlIGNhbiByZW1vdmVcbiAgICAgICAgICAgIC8vIHRoaXMgYmxvY2suXG5cbiAgICAgICAgICAgIGlmICh0eXBlb2YgU3RvcEl0ZXJhdGlvbiA9PT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgIC8vIEVTNiBHZW5lcmF0b3JzXG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gZ2VuZXJhdG9yW3ZlcmJdKGFyZyk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZXhjZXB0aW9uKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZWplY3QoZXhjZXB0aW9uKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5kb25lKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBRKHJlc3VsdC52YWx1ZSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdoZW4ocmVzdWx0LnZhbHVlLCBjYWxsYmFjaywgZXJyYmFjayk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAvLyBTcGlkZXJNb25rZXkgR2VuZXJhdG9yc1xuICAgICAgICAgICAgICAgIC8vIEZJWE1FOiBSZW1vdmUgdGhpcyBjYXNlIHdoZW4gU00gZG9lcyBFUzYgZ2VuZXJhdG9ycy5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICByZXN1bHQgPSBnZW5lcmF0b3JbdmVyY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VmZXJyZWQgPSBkZWZlcigpO1xuICAgICAgICBhcnJheV9yZWR1Y2UocHJvbWlzZXMsIGZ1bmN0aW9uICh1bmRlZmluZWQsIHByb21pc2UsIGluZGV4KSB7XG4gICAgICAgICAgICB2YXIgc25hcHNob3Q7XG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgaXNQcm9taXNlKHByb21pc2UpICYmXG4gICAgICAgICAgICAgICAgKHNuYXBzaG90ID0gcHJvbWlzZS5pbnNwZWN0KCkpLnN0YXRlID09PSBcImZ1bGZpbGxlZFwiXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSBzbmFwc2hvdC52YWx1ZTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgKytwZW5kaW5nQ291bnQ7XG4gICAgICAgICAgICAgICAgd2hlbihcbiAgICAgICAgICAgICAgICAgICAgcHJvbWlzZSxcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gKHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9taXNlc1tpbmRleF0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgtLXBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlc29sdmUocHJvbWlzZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBkZWZlcnJlZC5yZWplY3QsXG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChwcm9ncmVzcykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZGVmZXJyZWQubm90aWZ5KHsgaW5kZXg6IGluZGV4LCB2YWx1ZTogcHJvZ3Jlc3MgfSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfV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2VzW2luZGV4XTtcblxuICAgICAgICBwZW5kaW5nQ291bnQrKztcblxuICAgICAgICB3aGVuKHByb21pc2UsIG9uRnVsZmlsbGVkLCBvblJlamVjdGVkLCBvblByb2dyZXNzKTtcbiAgICAgICAgZnVuY3Rpb24gb25GdWxmaWxsZWQocmVzdWx0KSB7XG4gICAgICAgICAgICBkZWZlcnJlZC5yZXNvbHZlKHJlc3VsdCk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gb25SZWplY3RlZCgpIHtcbiAgICAgICAgICAgIHBlbmRpbmdDb3VudC0tO1xuICAgICAgICAgICAgaWYgKHBlbmRpbmdDb3VudCA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGRlZmVycmVkLnJlamVjdChuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgIFwiQ2FuJ3QgZ2V0IGZ1bGZpbGxtZW50IHZhbHVlIGZyb20gYW55IHByb21pc2UsIGFsbCBcIiArXG4gICAgICAgICAgICAgICAgICAgIFwicHJvbWlzZXMgd2VyZSByZWplY3RlZC5cIlxuICAgICAgICAgICAgICAgICkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIG9uUHJvZ3Jlc3MocHJvZ3Jlc3MpIHtcbiAgICAgICAgICAgIGRlZmVycmVkLm5vdGlmeSh7XG4gICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxuICAgICAgICAgICAgICAgIHZhbHVlOiBwcm9ncmVzc1xuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9LCB1bmRlZmluZWQpO1xuXG4gICAgcmV0dXJuIGRlZmVycmVkLnByb21pc2U7XG59XG5cblByb21pc2UucHJvdG90eXBlLmFueSA9IGZ1bmN0aW9uICgpIHtcbiAgICByZXR1cm4gYW55KHRoaXMpO1xufTtcblxuLyoqXG4gKiBXYWl0cyBmb3IgYWxsIHByb21pc2VzIHRvIGJlIHNldHRsZWQsIGVpdGhlciBmdWxma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wb3J0cyA9IHJlcXVlc3Q7XG4iXX0=\r
+\r
+ /*global JSONEditor*/\r
+'use strict';\r
+\r
+window.SwaggerUi = Backbone.Router.extend({\r
+\r
+  dom_id: 'swagger_ui',\r
+\r
+  // Attributes\r
+  options: null,\r
+  api: null,\r
+  headerView: null,\r
+  mainView: null,\r
+\r
+  // SwaggerUi accepts all the same options as SwaggerApi\r
+  initialize: function(options) {\r
+    options = options || {};\r
+\r
+    if (options.defaultModelRendering !== 'model') {\r
+      options.defaultModelRendering = 'schema';\r
+    }\r
+\r
+    if (!options.highlightSizeThreshold) {\r
+      options.highlightSizeThreshold = 100000;\r
+    }\r
+\r
+    // Allow dom_id to be overridden\r
+    if (options.dom_id) {\r
+      this.dom_id = options.dom_id;\r
+      delete options.dom_id;\r
+    }\r
+\r
+    if (!options.supportedSubmitMethods){\r
+      options.supportedSubmitMethods = [\r
+        'get',\r
+        'put',\r
+        'post',\r
+        'delete',\r
+        'head',\r
+        'options',\r
+        'patch'\r
+      ];\r
+    }\r
+\r
+    if (typeof options.oauth2RedirectUrl === 'string') {\r
+      window.oAuthRedirectUrl = options.redirectUrl;\r
+    }\r
+\r
+    // Create an empty div which contains the dom_id\r
+    if (! $('#' + this.dom_id).length){\r
+      $('body').append('<div id="' + this.dom_id + '"></div>') ;\r
+    }\r
+\r
+    this.options = options;\r
+\r
+    // set marked options\r
+    marked.setOptions({gfm: true});\r
+\r
+    // Set the callbacks\r
+    var that = this;\r
+    this.options.success = function() { return that.render(); };\r
+    this.options.progress = function(d) { return that.showMessage(d); };\r
+    this.options.failure = function(d) { return that.onLoadFailure(d); };\r
+\r
+    // Create view to handle the header inputs\r
+    this.headerView = new SwaggerUi.Views.HeaderView({el: $('#header')});\r
+\r
+    // Event handler for when the baseUrl/apiKey is entered by user\r
+    this.headerView.on('update-swagger-ui', function(data) {\r
+      return that.updateSwaggerUi(data);\r
+    });\r
+\r
+    // JSon Editor custom theming\r
+     JSONEditor.defaults.iconlibs.swagger = JSONEditor.AbstractIconLib.extend({\r
+      mapping: {\r
+        collapse: 'collapse',\r
+        expand: 'expand'\r
+        },\r
+      icon_prefix: 'swagger-'\r
+      });\r
+\r
+  },\r
+\r
+  // Set an option after initializing\r
+  setOption: function(option, value) {\r
+    this.options[option] = value;\r
+  },\r
+\r
+  // Get the value of a previously set option\r
+  getOption: function(option) {\r
+    return this.options[option];\r
+  },\r
+\r
+  // Event handler for when url/key is received from user\r
+  updateSwaggerUi: function(data){\r
+    this.options.url = data.url;\r
+    this.load();\r
+  },\r
+\r
+  // Create an api and render\r
+  load: function(){\r
+    // Initialize the API object\r
+    if (this.mainView) {\r
+      this.mainView.clear();\r
+    }\r
+\r
+    if (this.authView) {\r
+      this.authView.remove();\r
+    }\r
+    var url = this.options.url;\r
+    if (url && url.indexOf('http') !== 0) {\r
+      url = this.buildUrl(window.location.href.toString(), url);\r
+    }\r
+    if(this.api) {\r
+      this.options.authorizations = this.api.clientAuthorizations.authz;\r
+    }\r
+    this.options.url = url;\r
+    this.headerView.update(url);\r
+\r
+    this.api = new SwaggerClient(this.options);\r
+  },\r
+\r
+  // collapse all sections\r
+  collapseAll: function(){\r
+    Docs.collapseEndpointListForResource('');\r
+  },\r
+\r
+  // list operations for all sections\r
+  listAll: function(){\r
+    Docs.collapseOperationsForResource('');\r
+  },\r
+\r
+  // expand operations for all sections\r
+  expandAll: function(){\r
+    Docs.expandOperationsForResource('');\r
+  },\r
+\r
+  // This is bound to success handler for SwaggerApi\r
+  //  so it gets called when SwaggerApi completes loading\r
+  render: function(){\r
+    var authsModel;\r
+    this.showMessage('Finished Loading Resource Information. Rendering Swagger UI...');\r
+    this.mainView = new SwaggerUi.Views.MainView({\r
+      model: this.api,\r
+      el: $('#' + this.dom_id),\r
+      swaggerOptions: this.options,\r
+      router: this\r
+    }).render();\r
+    if (!_.isEmpty(this.api.securityDefinitions)){\r
+      authsModel = _.map(this.api.securityDefinitions, function (auth, name) {\r
+        var result = {};\r
+        result[name] = auth;\r
+        return result;\r
+      });\r
+      this.authView = new SwaggerUi.Views.AuthButtonView({\r
+        data: SwaggerUi.utils.parseSecurityDefinitions(authsModel),\r
+        router: this\r
+      });\r
+      $('#auth_container').append(this.authView.render().el);\r
+    }\r
+    this.showMessage();\r
+    switch (this.options.docExpansion) {\r
+      case 'full':\r
+        this.expandAll(); break;\r
+      case 'list':\r
+        this.listAll(); break;\r
+      default:\r
+        break;\r
+    }\r
+    this.renderGFM();\r
+\r
+    if (this.options.onComplete){\r
+      this.options.onComplete(this.api, this);\r
+    }\r
+\r
+    setTimeout(Docs.shebang.bind(this), 100);\r
+  },\r
+\r
+  buildUrl: function(base, url){\r
+    if (url.indexOf('/') === 0) {\r
+      var parts = base.split('/');\r
+      base = parts[0] + '//' + parts[2];\r
+      return base + url;\r
+    } else {\r
+      var endOfPath = base.length;\r
+\r
+      if (base.indexOf('?') > -1){\r
+        endOfPath = Math.min(endOfPath, base.indexOf('?'));\r
+      }\r
+\r
+      if (base.indexOf('#') > -1){\r
+        endOfPath = Math.min(endOfPath, base.indexOf('#'));\r
+      }\r
+\r
+      base = base.substring(0, endOfPath);\r
+\r
+      if (base.indexOf('/', base.length - 1 ) !== -1){\r
+        return base + url;\r
+      }\r
+\r
+      return base + '/' + url;\r
+    }\r
+  },\r
+\r
+  // Shows message on topbar of the ui\r
+  showMessage: function(data){\r
+    if (data === undefined) {\r
+      data = '';\r
+    }\r
+    var $msgbar = $('#message-bar');\r
+    $msgbar.removeClass('message-fail');\r
+    $msgbar.addClass('message-success');\r
+    $msgbar.text(data);\r
+    if(window.SwaggerTranslator) {\r
+      window.SwaggerTranslator.translate($msgbar);\r
+    }\r
+  },\r
+\r
+  // shows message in red\r
+  onLoadFailure: function(data){\r
+    if (data === undefined) {\r
+      data = '';\r
+    }\r
+    $('#message-bar').removeClass('message-success');\r
+    $('#message-bar').addClass('message-fail');\r
+\r
+    var val = $('#message-bar').text(data);\r
+\r
+    if (this.options.onFailure) {\r
+      this.options.onFailure(data);\r
+    }\r
+\r
+    return val;\r
+  },\r
+\r
+  // Renders GFM for elements with 'markdown' class\r
+  renderGFM: function(){\r
+    $('.markdown').each(function(){\r
+      $(this).html(marked($(this).html()));\r
+    });\r
+\r
+    $('.propDesc', '.model-signature .description').each(function () {\r
+      $(this).html(marked($(this).html())).addClass('markdown');\r
+    });\r
+  }\r
+\r
+});\r
+\r
+window.SwaggerUi.Views = {};\r
+window.SwaggerUi.Models = {};\r
+window.SwaggerUi.Collections = {};\r
+window.SwaggerUi.partials = {};\r
+window.SwaggerUi.utils = {};\r
+\r
+// don't break backward compatibility with previous versions and warn users to upgrade their code\r
+(function(){\r
+  window.authorizations = {\r
+    add: function() {\r
+      warn('Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add().');\r
+\r
+      if (typeof window.swaggerUi === 'undefined') {\r
+        throw new TypeError('window.swaggerUi is not defined');\r
+      }\r
+\r
+      if (window.swaggerUi instanceof SwaggerUi) {\r
+        window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations, arguments);\r
+      }\r
+    }\r
+  };\r
+\r
+  window.ApiKeyAuthorization = function() {\r
+    warn('window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization.');\r
+    SwaggerClient.ApiKeyAuthorization.apply(window, arguments);\r
+  };\r
+\r
+  window.PasswordAuthorization = function() {\r
+    warn('window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization.');\r
+    SwaggerClient.PasswordAuthorization.apply(window, arguments);\r
+  };\r
+\r
+  function warn(message) {\r
+    if ('console' in window && typeof window.console.warn === 'function') {\r
+      console.warn(message);\r
+    }\r
+  }\r
+})();\r
+\r
+\r
+// UMD\r
+(function (root, factory) {\r
+    if (typeof define === 'function' && define.amd) {\r
+        // AMD. Register as an anonymous module.\r
+        define(['b'], function (b) {\r
+            return (root.SwaggerUi = factory(b));\r
+        });\r
+    } else if (typeof exports === 'object') {\r
+        // Node. Does not work with strict CommonJS, but\r
+        // only CommonJS-like environments that support module.exports,\r
+        // like Node.\r
+        module.exports = factory(require('b'));\r
+    } else {\r
+        // Browser globals\r
+        root.SwaggerUi = factory(root.b);\r
+    }\r
+}(this, function () {\r
+    return SwaggerUi;\r
+}));\r
+\r
+'use strict';\r
+\r
+window.SwaggerUi.utils = {\r
+    parseSecurityDefinitions: function (security) {\r
+        var auths = Object.assign({}, window.swaggerUi.api.authSchemes || window.swaggerUi.api.securityDefinitions);\r
+        var oauth2Arr = [];\r
+        var authsArr = [];\r
+        var scopes = [];\r
+        var utils = window.SwaggerUi.utils;\r
+\r
+        if (!Array.isArray(security)) { return null; }\r
+\r
+        security.forEach(function (item) {\r
+            var singleSecurity = {};\r
+            var singleOauth2Security = {};\r
+\r
+            for (var key in item) {\r
+                if (Array.isArray(item[key])) {\r
+                    if (!auths[key]) { continue; }\r
+                    auths[key] = auths[key] || {};\r
+                    if (auths[key].type === 'oauth2') {\r
+                        singleOauth2Security[key] = Object.assign({}, auths[key]);\r
+                        for (var i in singleOauth2Security[key].scopes) {\r
+                            if (item[key].indexOf(i) < 0) {\r
+                                delete singleOauth2Security[key].scopes[i];\r
+                            }\r
+                        }\r
+                        singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes);\r
+                        scopes = _.merge(scopes, singleOauth2Security[key].scopes);\r
+                    } else {\r
+                        singleSecurity[key] = Object.assign({}, auths[key]);\r
+                    }\r
+                } else {\r
+                    if (item[key].type === 'oauth2') {\r
+                        singleOauth2Security[key] = Object.assign({}, item[key]);\r
+                        singleOauth2Security[key].scopes = utils.parseOauth2Scopes(singleOauth2Security[key].scopes);\r
+                        scopes = _.merge(scopes, singleOauth2Security[key].scopes);\r
+                    } else {\r
+                        singleSecurity[key] = item[key];\r
+                    }\r
+                }\r
+            }\r
+\r
+            if (!_.isEmpty(singleSecurity)) {\r
+                authsArr.push(singleSecurity);\r
+            }\r
+\r
+            if (!_.isEmpty(singleOauth2Security)){\r
+                oauth2Arr.push(singleOauth2Security);\r
+            }\r
+        });\r
+\r
+        return {\r
+            auths : authsArr,\r
+            oauth2: oauth2Arr,\r
+            scopes: scopes\r
+        };\r
+    },\r
+\r
+    parseOauth2Scopes: function (data) {\r
+        var scopes = Object.assign({}, data);\r
+        var result = [];\r
+        var key;\r
+\r
+        for (key in scopes) {\r
+            result.push({scope: key, description: scopes[key]});\r
+        }\r
+\r
+        return result;\r
+    }\r
+};\r
+'use strict';\r
+\r
+SwaggerUi.Models.ApiKeyAuthModel = Backbone.Model.extend({\r
+    defaults: {\r
+        'in': '',\r
+        name: '',\r
+        title: '',\r
+        value: ''\r
+    },\r
+\r
+    initialize: function () {\r
+        this.on('change', this.validate);\r
+    },\r
+\r
+    validate: function () {\r
+        var valid = !!this.get('value');\r
+\r
+        this.set('valid', valid);\r
+\r
+        return valid;\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.ApiKeyAuthView = Backbone.View.extend({ // TODO: append this to global SwaggerUi\r
+\r
+    events: {\r
+        'change .input_apiKey_entry': 'apiKeyChange'\r
+    },\r
+\r
+    selectors: {\r
+        apikeyInput: '.input_apiKey_entry'\r
+    },\r
+\r
+    template: Handlebars.templates.apikey_auth,\r
+\r
+    initialize: function(opts) {\r
+        this.options = opts || {};\r
+        this.router = this.options.router;\r
+    },\r
+\r
+    render: function (){\r
+        this.$el.html(this.template(this.model.toJSON()));\r
+\r
+        return this;\r
+    },\r
+\r
+    apiKeyChange: function (e) {\r
+        var val = $(e.target).val();\r
+        if (val) {\r
+            this.$(this.selectors.apikeyInput).removeClass('error');\r
+        }\r
+\r
+        this.model.set('value', val);\r
+    },\r
+\r
+    isValid: function () {\r
+        return this.model.validate();\r
+    },\r
+\r
+    highlightInvalid: function () {\r
+        if (!this.isValid()) {\r
+            this.$(this.selectors.apikeyInput).addClass('error');\r
+        }\r
+    }\r
+\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.AuthButtonView = Backbone.View.extend({\r
+    events: {\r
+        'click .authorize__btn': 'authorizeBtnClick'\r
+    },\r
+\r
+    tpls: {\r
+        popup: Handlebars.templates.popup,\r
+        authBtn: Handlebars.templates.auth_button,\r
+        authBtnOperation: Handlebars.templates.auth_button_operation\r
+    },\r
+\r
+    initialize: function(opts) {\r
+        this.options = opts || {};\r
+        this.options.data = this.options.data || {};\r
+        this.isOperation = this.options.isOperation;\r
+        this.model = this.model || {};\r
+        this.router = this.options.router;\r
+        this.auths = this.options.data.oauth2.concat(this.options.data.auths);\r
+    },\r
+\r
+    render: function () {\r
+        var tplName = this.isOperation ? 'authBtnOperation' : 'authBtn';\r
+\r
+        this.$authEl = this.renderAuths(this.auths);\r
+        this.$el.html(this.tpls[tplName](this.model));\r
+\r
+        return this;\r
+    },\r
+\r
+    authorizeBtnClick: function (e) {\r
+        var authsModel;\r
+\r
+        e.preventDefault();\r
+\r
+        authsModel = {\r
+            title: 'Available authorizations',\r
+            content: this.$authEl\r
+        };\r
+\r
+        this.popup = new SwaggerUi.Views.PopupView({model: authsModel});\r
+        this.popup.render();\r
+    },\r
+\r
+    renderAuths: function (auths) {\r
+        var $el = $('<div>');\r
+        var isLogout = false;\r
+\r
+        auths.forEach(function (auth) {\r
+            var authView = new SwaggerUi.Views.AuthView({data: auth, router: this.router});\r
+            var authEl = authView.render().el;\r
+            $el.append(authEl);\r
+            if (authView.isLogout) {\r
+                isLogout = true;\r
+            }\r
+        }, this);\r
+\r
+        this.model.isLogout = isLogout;\r
+\r
+        return $el;\r
+    }\r
+\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Collections.AuthsCollection = Backbone.Collection.extend({\r
+    constructor: function() {\r
+        var args = Array.prototype.slice.call(arguments);\r
+\r
+        args[0] = this.parse(args[0]);\r
+\r
+        Backbone.Collection.apply(this, args);\r
+    },\r
+\r
+    add: function (model) {\r
+        var args = Array.prototype.slice.call(arguments);\r
+\r
+        if (Array.isArray(model)) {\r
+            args[0] = _.map(model, function(val) {\r
+                return this.handleOne(val);\r
+            }, this);\r
+        } else {\r
+            args[0] = this.handleOne(model);\r
+        }\r
+\r
+        Backbone.Collection.prototype.add.apply(this, args);\r
+    },\r
+\r
+    handleOne: function (model) {\r
+        var result = model;\r
+\r
+        if (! (model instanceof Backbone.Model) ) {\r
+            switch (model.type) {\r
+                case 'oauth2':\r
+                    result = new SwaggerUi.Models.Oauth2Model(model);\r
+                    break;\r
+                case 'basic':\r
+                    result = new SwaggerUi.Models.BasicAuthModel(model);\r
+                    break;\r
+                case 'apiKey':\r
+                    result = new SwaggerUi.Models.ApiKeyAuthModel(model);\r
+                    break;\r
+                default:\r
+                    result = new Backbone.Model(model);\r
+            }\r
+        }\r
+\r
+        return result;\r
+    },\r
+\r
+    isValid: function () {\r
+        var valid = true;\r
+\r
+        this.models.forEach(function(model) {\r
+            if (!model.validate()) {\r
+                valid = false;\r
+            }\r
+        });\r
+\r
+        return valid;\r
+    },\r
+\r
+    isAuthorized: function () {\r
+        return this.length === this.where({ isLogout: true }).length;\r
+    },\r
+\r
+    isPartiallyAuthorized: function () {\r
+        return this.where({ isLogout: true }).length > 0;\r
+    },\r
+\r
+    parse: function (data) {\r
+        var authz = Object.assign({}, window.swaggerUi.api.clientAuthorizations.authz);\r
+\r
+        return _.map(data, function (auth, name) {\r
+            var isBasic = authz.basic && auth.type === 'basic';\r
+\r
+            _.extend(auth, {\r
+                title: name\r
+            });\r
+\r
+            if (authz[name] || isBasic) {\r
+                _.extend(auth, {\r
+                    isLogout: true,\r
+                    value: isBasic ? undefined : authz[name].value,\r
+                    username: isBasic ? authz.basic.username : undefined,\r
+                    password: isBasic ? authz.basic.password : undefined,\r
+                    valid: true\r
+                });\r
+            }\r
+\r
+            return auth;\r
+        });\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.AuthsCollectionView = Backbone.View.extend({\r
+\r
+    initialize: function(opts) {\r
+        this.options = opts || {};\r
+        this.options.data = this.options.data || {};\r
+        this.router = this.options.router;\r
+\r
+        this.collection = new SwaggerUi.Collections.AuthsCollection(opts.data);\r
+\r
+        this.$innerEl = $('<div>');\r
+        this.authViews = [];\r
+    },\r
+\r
+    render: function () {\r
+        this.collection.each(function (auth) {\r
+            this.renderOneAuth(auth);\r
+        }, this);\r
+\r
+        this.$el.html(this.$innerEl.html() ? this.$innerEl : '');\r
+\r
+        return this;\r
+    },\r
+\r
+    renderOneAuth: function (authModel) {\r
+        var authViewEl, authView, authViewName;\r
+        var type = authModel.get('type');\r
+\r
+        if (type === 'apiKey') {\r
+            authViewName = 'ApiKeyAuthView';\r
+        } else if (type === 'basic' && this.$innerEl.find('.basic_auth_container').length === 0) {\r
+            authViewName = 'BasicAuthView';\r
+        } else if (type === 'oauth2') {\r
+            authViewName = 'Oauth2View';\r
+        }\r
+\r
+        if (authViewName) {\r
+            authView = new SwaggerUi.Views[authViewName]({model: authModel, router: this.router});\r
+            authViewEl = authView.render().el;\r
+            this.authViews.push(authView);\r
+        }\r
+\r
+        this.$innerEl.append(authViewEl);\r
+    },\r
+\r
+    highlightInvalid: function () {\r
+        this.authViews.forEach(function (view) {\r
+            view.highlightInvalid();\r
+        }, this);\r
+    }\r
+\r
+});\r
+\r
+'use strict';\r
+\r
+/* global redirect_uri */\r
+/* global clientId */\r
+/* global scopeSeparator */\r
+/* global additionalQueryStringParams */\r
+/* global clientSecret */\r
+/* global onOAuthComplete */\r
+/* global realm */\r
+/*jshint unused:false*/\r
+\r
+SwaggerUi.Views.AuthView = Backbone.View.extend({\r
+    events: {\r
+        'click .auth_submit__button': 'authorizeClick',\r
+        'click .auth_logout__button': 'logoutClick'\r
+    },\r
+\r
+    tpls: {\r
+        main: Handlebars.templates.auth_view\r
+    },\r
+\r
+    selectors: {\r
+        innerEl: '.auth_inner',\r
+        authBtn: '.auth_submit__button'\r
+    },\r
+\r
+    initialize: function(opts) {\r
+        this.options = opts || {};\r
+        opts.data = opts.data || {};\r
+        this.router = this.options.router;\r
+\r
+        this.authsCollectionView = new SwaggerUi.Views.AuthsCollectionView({data: opts.data});\r
+\r
+        this.$el.html(this.tpls.main({\r
+            isLogout: this.authsCollectionView.collection.isAuthorized(),\r
+            isAuthorized: this.authsCollectionView.collection.isPartiallyAuthorized()\r
+        }));\r
+        this.$innerEl = this.$(this.selectors.innerEl);\r
+        this.isLogout = this.authsCollectionView.collection.isPartiallyAuthorized();\r
+    },\r
+\r
+    render: function () {\r
+        this.$innerEl.html(this.authsCollectionView.render().el);\r
+\r
+        return this;\r
+    },\r
+\r
+    authorizeClick: function (e) {\r
+        e.preventDefault();\r
+        e.stopPropagation();\r
+\r
+        if (this.authsCollectionView.collection.isValid()) {\r
+            this.authorize();\r
+        } else {\r
+            this.authsCollectionView.highlightInvalid();\r
+        }\r
+    },\r
+\r
+    authorize: function () {\r
+        this.authsCollectionView.collection.forEach(function (auth) {\r
+            var keyAuth, basicAuth;\r
+            var type = auth.get('type');\r
+\r
+            if (type === 'apiKey') {\r
+                keyAuth = new SwaggerClient.ApiKeyAuthorization(\r
+                    auth.get('name'),\r
+                    auth.get('value'),\r
+                    auth.get('in')\r
+                );\r
+\r
+                this.router.api.clientAuthorizations.add(auth.get('title'), keyAuth);\r
+            } else if (type === 'basic') {\r
+                basicAuth = new SwaggerClient.PasswordAuthorization(auth.get('username'), auth.get('password'));\r
+                this.router.api.clientAuthorizations.add(auth.get('type'), basicAuth);\r
+            } else if (type === 'oauth2') {\r
+                this.handleOauth2Login(auth);\r
+            }\r
+        }, this);\r
+\r
+        this.router.load();\r
+    },\r
+\r
+    logoutClick: function (e) {\r
+        e.preventDefault();\r
+\r
+        this.authsCollectionView.collection.forEach(function (auth) {\r
+            var name = auth.get('type') === 'basic' ? 'basic' : auth.get('title');\r
+\r
+            window.swaggerUi.api.clientAuthorizations.remove(name);\r
+        });\r
+\r
+        this.router.load();\r
+    },\r
+\r
+    // taken from lib/swagger-oauth.js\r
+    handleOauth2Login: function (auth) {\r
+        var host = window.location;\r
+        var pathname = location.pathname.substring(0, location.pathname.lastIndexOf('/'));\r
+        var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';\r
+        var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;\r
+        var url = null;\r
+        var scopes = _.map(auth.get('scopes'), function (scope) {\r
+            return scope.scope;\r
+        });\r
+        var state, dets, ep;\r
+        window.OAuthSchemeKey = auth.get('title');\r
+\r
+        window.enabledScopes = scopes;\r
+        var flow = auth.get('flow');\r
+\r
+        if(auth.get('type') === 'oauth2' && flow && (flow === 'implicit' || flow === 'accessCode')) {\r
+            dets = auth.attributes;\r
+            url = dets.authorizationUrl + '?response_type=' + (flow === 'implicit' ? 'token' : 'code');\r
+            window.swaggerUi.tokenName = dets.tokenName || 'access_token';\r
+            window.swaggerUi.tokenUrl = (flow === 'accessCode' ? dets.tokenUrl : null);\r
+            state = window.OAuthSchemeKey;\r
+        }\r
+        else if(auth.get('type') === 'oauth2' && flow && (flow === 'application')) {\r
+            dets = auth.attributes;\r
+            window.swaggerUi.tokenName = dets.tokenName || 'access_token';\r
+            this.clientCredentialsFlow(scopes, dets.tokenUrl, window.OAuthSchemeKey);\r
+            return;\r
+        }\r
+        else if(auth.get('grantTypes')) {\r
+            // 1.2 support\r
+            var o = auth.get('grantTypes');\r
+            for(var t in o) {\r
+                if(o.hasOwnProperty(t) && t === 'implicit') {\r
+                    dets = o[t];\r
+                    ep = dets.loginEndpoint.url;\r
+                    url = dets.loginEndpoint.url + '?response_type=token';\r
+                    window.swaggerUi.tokenName = dets.tokenName;\r
+                }\r
+                else if (o.hasOwnProperty(t) && t === 'accessCode') {\r
+                    dets = o[t];\r
+                    ep = dets.tokenRequestEndpoint.url;\r
+                    url = dets.tokenRequestEndpoint.url + '?response_type=code';\r
+                    window.swaggerUi.tokenName = dets.tokenName;\r
+                }\r
+            }\r
+        }\r
+\r
+        var redirect_uri = redirectUrl;\r
+\r
+        url += '&redirect_uri=' + encodeURIComponent(redirectUrl);\r
+        url += '&realm=' + encodeURIComponent(realm);\r
+        url += '&client_id=' + encodeURIComponent(clientId);\r
+        url += '&scope=' + encodeURIComponent(scopes.join(scopeSeparator));\r
+        url += '&state=' + encodeURIComponent(state);\r
+        for (var key in additionalQueryStringParams) {\r
+            url += '&' + key + '=' + encodeURIComponent(additionalQueryStringParams[key]);\r
+        }\r
+\r
+        window.open(url);\r
+    },\r
+\r
+    // taken from lib/swagger-oauth.js\r
+    clientCredentialsFlow: function (scopes, tokenUrl, OAuthSchemeKey) {\r
+        var params = {\r
+            'client_id': clientId,\r
+            'client_secret': clientSecret,\r
+            'scope': scopes.join(' '),\r
+            'grant_type': 'client_credentials'\r
+        };\r
+        $.ajax({\r
+            url : tokenUrl,\r
+            type: 'POST',\r
+            data: params,\r
+            success: function (data)\r
+            {\r
+                onOAuthComplete(data, OAuthSchemeKey);\r
+            },\r
+            error: function ()\r
+            {\r
+                onOAuthComplete('');\r
+            }\r
+        });\r
+    }\r
+\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Models.BasicAuthModel = Backbone.Model.extend({\r
+    defaults: {\r
+        username: '',\r
+        password: '',\r
+        title: 'basic'\r
+    },\r
+\r
+    initialize: function () {\r
+        this.on('change', this.validate);\r
+    },\r
+\r
+    validate: function () {\r
+        var valid = !!this.get('password') && !!this.get('username');\r
+\r
+        this.set('valid', valid);\r
+\r
+        return valid;\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.BasicAuthView = Backbone.View.extend({\r
+\r
+    initialize: function (opts) {\r
+        this.options = opts || {};\r
+        this.router = this.options.router;\r
+    },\r
+\r
+    events: {\r
+        'change .auth_input': 'inputChange'\r
+    },\r
+\r
+    selectors: {\r
+        usernameInput: '.basic_auth__username',\r
+        passwordInput: '.basic_auth__password'\r
+    },\r
+\r
+    cls: {\r
+        error: 'error'\r
+    },\r
+\r
+    template: Handlebars.templates.basic_auth,\r
+\r
+    render: function(){\r
+        $(this.el).html(this.template(this.model.toJSON()));\r
+\r
+        return this;\r
+    },\r
+\r
+    inputChange: function (e) {\r
+        var $el = $(e.target);\r
+        var val = $el.val();\r
+        var attr = $el.prop('name');\r
+\r
+        if (val) {\r
+            $el.removeClass(this.cls.error);\r
+        }\r
+\r
+        this.model.set(attr, val);\r
+    },\r
+\r
+    isValid: function () {\r
+        return this.model.validate();\r
+    },\r
+\r
+    highlightInvalid: function () {\r
+        if (!this.model.get('username')) {\r
+            this.$(this.selectors.usernameInput).addClass(this.cls.error);\r
+        }\r
+\r
+        if (!this.model.get('password')) {\r
+            this.$(this.selectors.passwordInput).addClass(this.cls.error);\r
+        }\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.ContentTypeView = Backbone.View.extend({\r
+  initialize: function() {},\r
+\r
+  render: function(){\r
+       this.model.contentTypeId = 'ct' + Math.random();\r
+    $(this.el).html(Handlebars.templates.content_type(this.model));\r
+    return this;\r
+  }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.HeaderView = Backbone.View.extend({\r
+  events: {\r
+    'click #show-pet-store-icon'    : 'showPetStore',\r
+    'click #explore'                : 'showCustom',\r
+    'keyup #input_baseUrl'          : 'showCustomOnKeyup',\r
+    'keyup #input_apiKey'           : 'showCustomOnKeyup'\r
+  },\r
+\r
+  initialize: function(){},\r
+\r
+  showPetStore: function(){\r
+    this.trigger('update-swagger-ui', {\r
+      url:'http://petstore.swagger.io/v2/swagger.json'\r
+    });\r
+  },\r
+\r
+  showCustomOnKeyup: function(e){\r
+    if (e.keyCode === 13) {\r
+      this.showCustom();\r
+    }\r
+  },\r
+\r
+  showCustom: function(e){\r
+    if (e) {\r
+      e.preventDefault();\r
+    }\r
+\r
+    this.trigger('update-swagger-ui', {\r
+      url: $('#input_baseUrl').val()\r
+    });\r
+  },\r
+\r
+  update: function(url, apiKey, trigger){\r
+    if (trigger === undefined) {\r
+      trigger = false;\r
+    }\r
+\r
+    $('#input_baseUrl').val(url);\r
+\r
+    if (trigger) {\r
+      this.trigger('update-swagger-ui', {url:url});\r
+    }\r
+  }\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Views.MainView = Backbone.View.extend({\r
+  apisSorter : {\r
+    alpha   : function(a,b){ return a.name.localeCompare(b.name); }\r
+  },\r
+  operationsSorters : {\r
+    alpha   : function(a,b){ return a.path.localeCompare(b.path); },\r
+    method  : function(a,b){ return a.method.localeCompare(b.method); }\r
+  },\r
+  initialize: function(opts){\r
+    var sorterOption, sorterFn, key, value;\r
+    opts = opts || {};\r
+\r
+    this.router = opts.router;\r
+\r
+    // Sort APIs\r
+    if (opts.swaggerOptions.apisSorter) {\r
+      sorterOption = opts.swaggerOptions.apisSorter;\r
+      if (_.isFunction(sorterOption)) {\r
+        sorterFn = sorterOption;\r
+      } else {\r
+        sorterFn = this.apisSorter[sorterOption];\r
+      }\r
+      if (_.isFunction(sorterFn)) {\r
+        this.model.apisArray.sort(sorterFn);\r
+      }\r
+    }\r
+    // Sort operations of each API\r
+    if (opts.swaggerOptions.operationsSorter) {\r
+      sorterOption = opts.swaggerOptions.operationsSorter;\r
+      if (_.isFunction(sorterOption)) {\r
+        sorterFn = sorterOption;\r
+      } else {\r
+        sorterFn = this.operationsSorters[sorterOption];\r
+      }\r
+      if (_.isFunction(sorterFn)) {\r
+        for (key in this.model.apisArray) {\r
+          this.model.apisArray[key].operationsArray.sort(sorterFn);\r
+        }\r
+      }\r
+    }\r
+\r
+    // set up the UI for input\r
+    this.model.auths = [];\r
+\r
+    for (key in this.model.securityDefinitions) {\r
+      value = this.model.securityDefinitions[key];\r
+\r
+      this.model.auths.push({\r
+        name: key,\r
+        type: value.type,\r
+        value: value\r
+      });\r
+    }\r
+\r
+    if ('validatorUrl' in opts.swaggerOptions) {\r
+      // Validator URL specified explicitly\r
+      this.model.validatorUrl = opts.swaggerOptions.validatorUrl;\r
+    } else if (this.model.url.indexOf('localhost') > 0 || this.model.url.indexOf('127.0.0.1') > 0) {\r
+      // Localhost override\r
+      this.model.validatorUrl = null;\r
+    } else {\r
+      // Default validator\r
+      if(window.location.protocol === 'https:') {\r
+        this.model.validatorUrl = 'https://online.swagger.io/validator';\r
+      }\r
+      else {\r
+        this.model.validatorUrl = 'http://online.swagger.io/validator';\r
+      }\r
+    }\r
+\r
+    // JSonEditor requires type='object' to be present on defined types, we add it if it's missing\r
+    // is there any valid case were it should not be added ?\r
+    var def;\r
+    for(def in this.model.definitions){\r
+      if (!this.model.definitions[def].type){\r
+        this.model.definitions[def].type = 'object';\r
+      }\r
+    }\r
+\r
+  },\r
+\r
+  render: function () {\r
+    $(this.el).html(Handlebars.templates.main(this.model));\r
+    this.info = this.$('.info')[0];\r
+\r
+    if (this.info) {\r
+      this.info.addEventListener('click', this.onLinkClick, true);\r
+    }\r
+\r
+    this.model.securityDefinitions = this.model.securityDefinitions || {};\r
+\r
+    // Render each resource\r
+\r
+    var resources = {};\r
+    var counter = 0;\r
+    for (var i = 0; i < this.model.apisArray.length; i++) {\r
+      var resource = this.model.apisArray[i];\r
+      var id = resource.name;\r
+      while (typeof resources[id] !== 'undefined') {\r
+        id = id + '_' + counter;\r
+        counter += 1;\r
+      }\r
+      resource.id = id;\r
+      resources[id] = resource;\r
+      this.addResource(resource, this.model.auths);\r
+    }\r
+\r
+    $('.propWrap').hover(function onHover(){\r
+      $('.optionsWrapper', $(this)).show();\r
+    }, function offhover(){\r
+      $('.optionsWrapper', $(this)).hide();\r
+    });\r
+    return this;\r
+  },\r
+\r
+  addResource: function(resource, auths){\r
+    // Render a resource and add it to resources li\r
+    resource.id = resource.id.replace(/\s/g, '_');\r
+\r
+    // Make all definitions available at the root of the resource so that they can\r
+    // be loaded by the JSonEditor\r
+    resource.definitions = this.model.definitions;\r
+\r
+    var resourceView = new SwaggerUi.Views.ResourceView({\r
+      model: resource,\r
+      router: this.router,\r
+      tagName: 'li',\r
+      id: 'resource_' + resource.id,\r
+      className: 'resource',\r
+      auths: auths,\r
+      swaggerOptions: this.options.swaggerOptions\r
+    });\r
+    $('#resources', this.el).append(resourceView.render().el);\r
+  },\r
+\r
+  clear: function(){\r
+    $(this.el).html('');\r
+  },\r
+\r
+  onLinkClick: function (e) {\r
+    var el = e.target;\r
+\r
+    if (el.tagName === 'A' && el.href && !el.target) {\r
+        e.preventDefault();\r
+        window.open(el.href, '_blank');\r
+    }\r
+  }\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Models.Oauth2Model = Backbone.Model.extend({\r
+    defaults: {\r
+        scopes: {}\r
+    },\r
+\r
+    initialize: function () {\r
+        this.on('change', this.validate);\r
+    },\r
+\r
+    setScopes: function (name, val) {\r
+        var auth = _.extend({}, this.attributes);\r
+        var index = _.findIndex(auth.scopes, function(o) {\r
+            return o.scope === name;\r
+        });\r
+        auth.scopes[index].checked = val;\r
+\r
+        this.set(auth);\r
+        this.validate();\r
+    },\r
+\r
+    validate: function () {\r
+        var valid =  _.findIndex(this.get('scopes'), function (o) {\r
+           return o.checked === true;\r
+        }) > -1;\r
+\r
+        this.set('valid', valid);\r
+\r
+        return valid;\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.Oauth2View = Backbone.View.extend({\r
+    events: {\r
+        'change .oauth-scope': 'scopeChange'\r
+    },\r
+\r
+    template: Handlebars.templates.oauth2,\r
+\r
+    render: function () {\r
+        this.$el.html(this.template(this.model.toJSON()));\r
+\r
+        return this;\r
+    },\r
+\r
+    scopeChange: function (e) {\r
+        var val = $(e.target).prop('checked');\r
+        var scope = $(e.target).data('scope');\r
+\r
+        this.model.setScopes(scope, val);\r
+    }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.OperationView = Backbone.View.extend({\r
+  invocationUrl: null,\r
+\r
+  events: {\r
+    'submit .sandbox'         : 'submitOperation',\r
+    'click .submit'           : 'submitOperation',\r
+    'click .response_hider'   : 'hideResponse',\r
+    'click .toggleOperation'  : 'toggleOperationContent',\r
+    'mouseenter .api-ic'      : 'mouseEnter',\r
+    'dblclick .curl'          : 'selectText',\r
+    'change [name=responseContentType]' : 'showSnippet'\r
+  },\r
+\r
+  initialize: function(opts) {\r
+    opts = opts || {};\r
+    this.router = opts.router;\r
+    this.auths = opts.auths;\r
+    this.parentId = this.model.parentId;\r
+    this.nickname = this.model.nickname;\r
+    this.model.encodedParentId = encodeURIComponent(this.parentId);\r
+\r
+    if (opts.swaggerOptions) {\r
+      this.model.defaultRendering = opts.swaggerOptions.defaultModelRendering;\r
+\r
+      if (opts.swaggerOptions.showRequestHeaders) {\r
+        this.model.showRequestHeaders = true;\r
+      }\r
+    }\r
+    return this;\r
+  },\r
+\r
+  selectText: function(event) {\r
+    var doc = document,\r
+        text = event.target.firstChild,\r
+        range,\r
+        selection;\r
+    if (doc.body.createTextRange) {\r
+      range = document.body.createTextRange();\r
+      range.moveToElementText(text);\r
+      range.select();\r
+    } else if (window.getSelection) {\r
+      selection = window.getSelection();\r
+      range = document.createRange();\r
+      range.selectNodeContents(text);\r
+      selection.removeAllRanges();\r
+      selection.addRange(range);\r
+    }\r
+  },\r
+\r
+  mouseEnter: function(e) {\r
+    var elem = $(this.el).find('.content');\r
+    var x = e.pageX;\r
+    var y = e.pageY;\r
+    var scX = $(window).scrollLeft();\r
+    var scY = $(window).scrollTop();\r
+    var scMaxX = scX + $(window).width();\r
+    var scMaxY = scY + $(window).height();\r
+    var wd = elem.width();\r
+    var hgh = elem.height();\r
+\r
+    if (x + wd > scMaxX) {\r
+      x = scMaxX - wd;\r
+    }\r
+\r
+    if (x < scX) {\r
+      x = scX;\r
+    }\r
+\r
+    if (y + hgh > scMaxY) {\r
+      y = scMaxY - hgh;\r
+    }\r
+\r
+    if (y < scY) {\r
+      y = scY;\r
+    }\r
+\r
+    var pos = {};\r
+    pos.top = y;\r
+    pos.left = x;\r
+    elem.css(pos);\r
+  },\r
+\r
+  // Note: copied from CoffeeScript compiled file\r
+  // TODO: redactor\r
+  render: function() {\r
+    var a, auth, auths, code, contentTypeModel, isMethodSubmissionSupported, k, key, l, len, len1, len2, len3, len4, m, modelAuths, n, o, p, param, q, ref, ref1, ref2, ref3, ref4, ref5, responseContentTypeView, responseSignatureView, schema, schemaObj, scopeIndex, signatureModel, statusCode, successResponse, type, v, value, produces, isXML, isJSON;\r
+    isMethodSubmissionSupported = jQuery.inArray(this.model.method, this.model.supportedSubmitMethods()) >= 0;\r
+    if (!isMethodSubmissionSupported) {\r
+      this.model.isReadOnly = true;\r
+    }\r
+    this.model.description = this.model.description || this.model.notes;\r
+    this.model.oauth = null;\r
+    modelAuths = this.model.authorizations || this.model.security;\r
+    if (modelAuths) {\r
+      if (Array.isArray(modelAuths)) {\r
+        for (l = 0, len = modelAuths.length; l < len; l++) {\r
+          auths = modelAuths[l];\r
+          for (key in auths) {\r
+            for (a in this.auths) {\r
+              auth = this.auths[a];\r
+              if (key === auth.name) {\r
+                if (auth.type === 'oauth2') {\r
+                  this.model.oauth = {};\r
+                  this.model.oauth.scopes = [];\r
+                  ref1 = auth.value.scopes;\r
+                  for (k in ref1) {\r
+                    v = ref1[k];\r
+                    scopeIndex = auths[key].indexOf(k);\r
+                    if (scopeIndex >= 0) {\r
+                      o = {\r
+                        scope: k,\r
+                        description: v\r
+                      };\r
+                      this.model.oauth.scopes.push(o);\r
+                    }\r
+                  }\r
+                }\r
+              }\r
+            }\r
+          }\r
+        }\r
+      } else {\r
+        for (k in modelAuths) {\r
+          v = modelAuths[k];\r
+          if (k === 'oauth2') {\r
+            if (this.model.oauth === null) {\r
+              this.model.oauth = {};\r
+            }\r
+            if (this.model.oauth.scopes === void 0) {\r
+              this.model.oauth.scopes = [];\r
+            }\r
+            for (m = 0, len1 = v.length; m < len1; m++) {\r
+              o = v[m];\r
+              this.model.oauth.scopes.push(o);\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+    if (typeof this.model.responses !== 'undefined') {\r
+      this.model.responseMessages = [];\r
+      ref2 = this.model.responses;\r
+      for (code in ref2) {\r
+        value = ref2[code];\r
+        schema = null;\r
+        schemaObj = this.model.responses[code].schema;\r
+        if (schemaObj && schemaObj.$ref) {\r
+          schema = schemaObj.$ref;\r
+          if (schema.indexOf('#/definitions/') !== -1) {\r
+            schema = schema.replace(/^.*#\/definitions\//, '');\r
+          }\r
+        }\r
+        this.model.responseMessages.push({\r
+          code: code,\r
+          message: value.description,\r
+          responseModel: schema,\r
+          headers: value.headers,\r
+          schema: schemaObj\r
+        });\r
+      }\r
+    }\r
+    if (typeof this.model.responseMessages === 'undefined') {\r
+      this.model.responseMessages = [];\r
+    }\r
+    signatureModel = null;\r
+    produces = this.model.produces;\r
+    isXML = this.contains(produces, 'xml');\r
+    isJSON = isXML ? this.contains(produces, 'json') : true;\r
+\r
+    if (this.model.successResponse) {\r
+      successResponse = this.model.successResponse;\r
+      for (key in successResponse) {\r
+        value = successResponse[key];\r
+        this.model.successCode = key;\r
+        if (typeof value === 'object' && typeof value.createJSONSample === 'function') {\r
+          this.model.successDescription = value.description;\r
+          this.model.headers = this.parseResponseHeaders(value.headers);\r
+          signatureModel = {\r
+            sampleJSON: isJSON ? JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2) : false,\r
+            isParam: false,\r
+            sampleXML: isXML ? SwaggerUi.partials.signature.createXMLSample(value.name, value.definition, value.models) : false,\r
+            signature: SwaggerUi.partials.signature.getModelSignature(value.name, value.definition, value.models, value.modelPropertyMacro)\r
+          };\r
+        } else {\r
+          signatureModel = {\r
+            signature: SwaggerUi.partials.signature.getPrimitiveSignature(value)\r
+          };\r
+        }\r
+      }\r
+    } else if (this.model.responseClassSignature && this.model.responseClassSignature !== 'string') {\r
+      signatureModel = {\r
+        sampleJSON: this.model.responseSampleJSON,\r
+        isParam: false,\r
+        signature: this.model.responseClassSignature\r
+      };\r
+    }\r
+    $(this.el).html(Handlebars.templates.operation(this.model));\r
+    if (signatureModel) {\r
+      signatureModel.defaultRendering = this.model.defaultRendering;\r
+      responseSignatureView = new SwaggerUi.Views.SignatureView({\r
+        model: signatureModel,\r
+        router: this.router,\r
+        tagName: 'div'\r
+      });\r
+      $('.model-signature', $(this.el)).append(responseSignatureView.render().el);\r
+    } else {\r
+      this.model.responseClassSignature = 'string';\r
+      $('.model-signature', $(this.el)).html(this.model.type);\r
+    }\r
+    contentTypeModel = {\r
+      isParam: false\r
+    };\r
+    contentTypeModel.consumes = this.model.consumes;\r
+    contentTypeModel.produces = this.model.produces;\r
+    ref3 = this.model.parameters;\r
+    for (n = 0, len2 = ref3.length; n < len2; n++) {\r
+      param = ref3[n];\r
+      type = param.type || param.dataType || '';\r
+      if (typeof type === 'undefined') {\r
+        schema = param.schema;\r
+        if (schema && schema.$ref) {\r
+          ref = schema.$ref;\r
+          if (ref.indexOf('#/definitions/') === 0) {\r
+            type = ref.substring('#/definitions/'.length);\r
+          } else {\r
+            type = ref;\r
+          }\r
+        }\r
+      }\r
+      if (type && type.toLowerCase() === 'file') {\r
+        if (!contentTypeModel.consumes) {\r
+          contentTypeModel.consumes = 'multipart/form-data';\r
+        }\r
+      }\r
+      param.type = type;\r
+    }\r
+    responseContentTypeView = new SwaggerUi.Views.ResponseContentTypeView({\r
+      model: contentTypeModel,\r
+      router: this.router\r
+    });\r
+    $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);\r
+    ref4 = this.model.parameters;\r
+    for (p = 0, len3 = ref4.length; p < len3; p++) {\r
+      param = ref4[p];\r
+      this.addParameter(param, contentTypeModel.consumes);\r
+    }\r
+    ref5 = this.model.responseMessages;\r
+    for (q = 0, len4 = ref5.length; q < len4; q++) {\r
+      statusCode = ref5[q];\r
+      statusCode.isXML = isXML;\r
+      statusCode.isJSON = isJSON;\r
+      if (!_.isUndefined(statusCode.headers)) {\r
+        statusCode.headers = this.parseHeadersType(statusCode.headers);\r
+      }\r
+      this.addStatusCode(statusCode);\r
+    }\r
+\r
+    if (Array.isArray(this.model.security)) {\r
+      var authsModel = SwaggerUi.utils.parseSecurityDefinitions(this.model.security);\r
+\r
+      authsModel.isLogout = !_.isEmpty(window.swaggerUi.api.clientAuthorizations.authz);\r
+      this.authView = new SwaggerUi.Views.AuthButtonView({\r
+        data: authsModel,\r
+        router: this.router,\r
+        isOperation: true,\r
+        model: {\r
+          scopes: authsModel.scopes\r
+        }\r
+      });\r
+      this.$('.authorize-wrapper').append(this.authView.render().el);\r
+    }\r
+\r
+    this.showSnippet();\r
+    return this;\r
+  },\r
+\r
+  parseHeadersType: function (headers) {\r
+    var map = {\r
+      'string': {\r
+        'date-time': 'dateTime',\r
+        'date'     : 'date'\r
+      }\r
+    };\r
+\r
+    _.forEach(headers, function (header) {\r
+      var value;\r
+      header = header || {};\r
+      value = map[header.type] && map[header.type][header.format];\r
+      if (!_.isUndefined(value)) {\r
+        header.type = value;\r
+      }\r
+    });\r
+\r
+    return headers;\r
+  },\r
+\r
+  contains: function (produces, type) {\r
+    return produces.filter(function (val) {\r
+      if (val.indexOf(type) > -1) {\r
+        return true;\r
+      }\r
+    }).length;\r
+  },\r
+\r
+  parseResponseHeaders: function (data) {\r
+    var HEADERS_SEPARATOR = '; ';\r
+    var headers = _.clone(data);\r
+\r
+    _.forEach(headers, function (header) {\r
+      var other = [];\r
+      _.forEach(header, function (value, key) {\r
+        var properties = ['type', 'description'];\r
+        if (properties.indexOf(key.toLowerCase()) === -1) {\r
+          other.push(key + ': ' + value);\r
+        }\r
+      });\r
+\r
+      other.join(HEADERS_SEPARATOR);\r
+      header.other = other;\r
+    });\r
+\r
+    return headers;\r
+  },\r
+\r
+  addParameter: function(param, consumes) {\r
+    // Render a parameter\r
+    param.consumes = consumes;\r
+    param.defaultRendering = this.model.defaultRendering;\r
+\r
+    // Copy this param JSON spec so that it will be available for JsonEditor\r
+    if(param.schema){\r
+      $.extend(true, param.schema, this.model.definitions[param.type]);\r
+      param.schema.definitions = this.model.definitions;\r
+      // This is required for JsonEditor to display the root properly\r
+      if(!param.schema.type){\r
+        param.schema.type = 'object';\r
+      }\r
+      // This is the title that will be used by JsonEditor for the root\r
+      // Since we already display the parameter's name in the Parameter column\r
+      // We set this to space, we can't set it to null or space otherwise JsonEditor\r
+      // will replace it with the text "root" which won't look good on screen\r
+      if(!param.schema.title){\r
+        param.schema.title = ' ';\r
+      }\r
+    }\r
+\r
+    var paramView = new SwaggerUi.Views.ParameterView({\r
+      model: param,\r
+      tagName: 'tr',\r
+      readOnly: this.model.isReadOnly,\r
+      swaggerOptions: this.options.swaggerOptions\r
+    });\r
+    $('.operation-params', $(this.el)).append(paramView.render().el);\r
+  },\r
+\r
+  addStatusCode: function(statusCode) {\r
+    // Render status codes\r
+    statusCode.defaultRendering = this.model.defaultRendering;\r
+    var statusCodeView = new SwaggerUi.Views.StatusCodeView({\r
+      model: statusCode,\r
+      tagName: 'tr',\r
+      router: this.router\r
+    });\r
+    $('.operation-status', $(this.el)).append(statusCodeView.render().el);\r
+  },\r
+\r
+  // Note: copied from CoffeeScript compiled file\r
+  // TODO: redactor\r
+  submitOperation: function(e) {\r
+    var error_free, form, isFileUpload, map, opts;\r
+    if (e !== null) {\r
+      e.preventDefault();\r
+    }\r
+    form = $('.sandbox', $(this.el));\r
+    error_free = true;\r
+    form.find('input.required').each(function() {\r
+      $(this).removeClass('error');\r
+      if (jQuery.trim($(this).val()) === '') {\r
+        $(this).addClass('error');\r
+        $(this).wiggle({\r
+          callback: (function(_this) {\r
+            return function() {\r
+              $(_this).focus();\r
+            };\r
+          })(this)\r
+        });\r
+        error_free = false;\r
+      }\r
+    });\r
+    form.find('textarea.required:visible').each(function() {\r
+      $(this).removeClass('error');\r
+      if (jQuery.trim($(this).val()) === '') {\r
+        $(this).addClass('error');\r
+        $(this).wiggle({\r
+          callback: (function(_this) {\r
+            return function() {\r
+              return $(_this).focus();\r
+            };\r
+          })(this)\r
+        });\r
+        error_free = false;\r
+      }\r
+    });\r
+    form.find('select.required').each(function() {\r
+      $(this).removeClass('error');\r
+      if (this.selectedIndex === -1) {\r
+        $(this).addClass('error');\r
+        $(this).wiggle({\r
+          callback: (function(_this) {\r
+            return function() {\r
+              $(_this).focus();\r
+            };\r
+          })(this)\r
+        });\r
+        error_free = false;\r
+      }\r
+    });\r
+    if (error_free) {\r
+      map = this.getInputMap(form);\r
+      isFileUpload = this.isFileUpload(form);\r
+      opts = {\r
+        parent: this\r
+      };\r
+      if (this.options.swaggerOptions) {\r
+        for(var key in this.options.swaggerOptions) {\r
+          opts[key] = this.options.swaggerOptions[key];\r
+        }\r
+      }\r
+\r
+      var pi;\r
+      for(pi = 0; pi < this.model.parameters.length; pi++){\r
+        var p = this.model.parameters[pi];\r
+        if( p.jsonEditor && p.jsonEditor.isEnabled()){\r
+          var json = p.jsonEditor.getValue();\r
+          map[p.name] = JSON.stringify(json);\r
+        }\r
+      }\r
+\r
+      opts.responseContentType = $('div select[name=responseContentType]', $(this.el)).val();\r
+      opts.requestContentType = $('div select[name=parameterContentType]', $(this.el)).val();\r
+      $('.response_throbber', $(this.el)).show();\r
+      if (isFileUpload) {\r
+        $('.request_url', $(this.el)).html('<pre></pre>');\r
+        $('.request_url pre', $(this.el)).text(this.invocationUrl);\r
+\r
+        opts.useJQuery = true;\r
+        map.parameterContentType = 'multipart/form-data';\r
+        this.map = map;\r
+        return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);\r
+      } else {\r
+        this.map = map;\r
+        return this.model.execute(map, opts, this.showCompleteStatus, this.showErrorStatus, this);\r
+      }\r
+    }\r
+  },\r
+\r
+  getInputMap: function (form) {\r
+    var map, ref1, l, len, o, ref2, m, len1, val, ref3, n, len2;\r
+    map = {};\r
+    ref1 = form.find('input');\r
+    for (l = 0, len = ref1.length; l < len; l++) {\r
+      o = ref1[l];\r
+      if ((o.value !== null) && jQuery.trim(o.value).length > 0) {\r
+        map[o.name] = o.value;\r
+      }\r
+      if (o.type === 'file') {\r
+        map[o.name] = o.files[0];\r
+      }\r
+    }\r
+    ref2 = form.find('textarea');\r
+    for (m = 0, len1 = ref2.length; m < len1; m++) {\r
+      o = ref2[m];\r
+      val = this.getTextAreaValue(o);\r
+      if ((val !== null) && jQuery.trim(val).length > 0) {\r
+        map[o.name] = val;\r
+      }\r
+    }\r
+    ref3 = form.find('select');\r
+    for (n = 0, len2 = ref3.length; n < len2; n++) {\r
+      o = ref3[n];\r
+      val = this.getSelectedValue(o);\r
+      if ((val !== null) && jQuery.trim(val).length > 0) {\r
+        map[o.name] = val;\r
+      }\r
+    }\r
+    return map;\r
+  },\r
+\r
+  isFileUpload: function (form) {\r
+    var ref1, l, len, o;\r
+    var isFileUpload = false;\r
+    ref1 = form.find('input');\r
+    for (l = 0, len = ref1.length; l < len; l++) {\r
+      o = ref1[l];\r
+      if (o.type === 'file') {\r
+        isFileUpload = true;\r
+      }\r
+    }\r
+    return isFileUpload;\r
+  },\r
+\r
+  success: function(response, parent) {\r
+    parent.showCompleteStatus(response);\r
+  },\r
+\r
+  // wraps a jquery response as a shred response\r
+  wrap: function(data) {\r
+    var h, headerArray, headers, i, l, len, o;\r
+    headers = {};\r
+    headerArray = data.getAllResponseHeaders().split('\r');\r
+    for (l = 0, len = headerArray.length; l < len; l++) {\r
+      i = headerArray[l];\r
+      h = i.match(/^([^:]*?):(.*)$/);\r
+      if (!h) {\r
+        h = [];\r
+      }\r
+      h.shift();\r
+      if (h[0] !== void 0 && h[1] !== void 0) {\r
+        headers[h[0].trim()] = h[1].trim();\r
+      }\r
+    }\r
+    o = {};\r
+    o.content = {};\r
+    o.content.data = data.responseText;\r
+    o.headers = headers;\r
+    o.request = {};\r
+    o.request.url = this.invocationUrl;\r
+    o.status = data.status;\r
+    return o;\r
+  },\r
+\r
+  getSelectedValue: function(select) {\r
+    if (!select.multiple) {\r
+      return select.value;\r
+    } else {\r
+      var options = [];\r
+      for (var l = 0, len = select.options.length; l < len; l++) {\r
+        var opt = select.options[l];\r
+        if (opt.selected) {\r
+          options.push(opt.value);\r
+        }\r
+      }\r
+      if (options.length > 0) {\r
+        return options;\r
+      } else {\r
+        return null;\r
+      }\r
+    }\r
+  },\r
+\r
+  // handler for hide response link\r
+  hideResponse: function(e) {\r
+    if (e) { e.preventDefault(); }\r
+    $('.response', $(this.el)).slideUp();\r
+    $('.response_hider', $(this.el)).fadeOut();\r
+  },\r
+\r
+  // Show response from server\r
+  showResponse: function(response) {\r
+    var prettyJson = JSON.stringify(response, null, '\t').replace(/\n/g, '<br>');\r
+    $('.response_body', $(this.el)).html(_.escape(prettyJson));\r
+  },\r
+\r
+  // Show error from server\r
+  showErrorStatus: function(data, parent) {\r
+    parent.showStatus(data);\r
+  },\r
+\r
+  // show the status codes\r
+  showCompleteStatus: function(data, parent){\r
+    parent.showStatus(data);\r
+  },\r
+\r
+  // Adapted from http://stackoverflow.com/a/2893259/454004\r
+  // Note: directly ported from CoffeeScript\r
+  // TODO: Cleanup CoffeeScript artifacts\r
+  formatXml: function(xml) {\r
+    var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;\r
+    reg = /(>)(<)(\/*)/g;\r
+    wsexp = /[ ]*(.*)[ ]+\n/g;\r
+    contexp = /(<.+>)(.+\n)/g;\r
+    xml = xml.replace(/\r\n/g, '\n').replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2');\r
+    pad = 0;\r
+    formatted = '';\r
+    lines = xml.split('\n');\r
+    indent = 0;\r
+    lastType = 'other';\r
+    transitions = {\r
+      'single->single': 0,\r
+      'single->closing': -1,\r
+      'single->opening': 0,\r
+      'single->other': 0,\r
+      'closing->single': 0,\r
+      'closing->closing': -1,\r
+      'closing->opening': 0,\r
+      'closing->other': 0,\r
+      'opening->single': 1,\r
+      'opening->closing': 0,\r
+      'opening->opening': 1,\r
+      'opening->other': 1,\r
+      'other->single': 0,\r
+      'other->closing': -1,\r
+      'other->opening': 0,\r
+      'other->other': 0\r
+    };\r
+    fn = function(ln) {\r
+      var fromTo, j, key, padding, type, types, value;\r
+      types = {\r
+        single: Boolean(ln.match(/<.+\/>/)),\r
+        closing: Boolean(ln.match(/<\/.+>/)),\r
+        opening: Boolean(ln.match(/<[^!?].*>/))\r
+      };\r
+      type = ((function() {\r
+        var results;\r
+        results = [];\r
+        for (key in types) {\r
+          value = types[key];\r
+          if (value) {\r
+            results.push(key);\r
+          }\r
+        }\r
+        return results;\r
+      })())[0];\r
+      type = type === void 0 ? 'other' : type;\r
+      fromTo = lastType + '->' + type;\r
+      lastType = type;\r
+      padding = '';\r
+      indent += transitions[fromTo];\r
+      padding = ((function() {\r
+        var m, ref1, results;\r
+        results = [];\r
+        for (j = m = 0, ref1 = indent; 0 <= ref1 ? m < ref1 : m > ref1; j = 0 <= ref1 ? ++m : --m) {\r
+          results.push('  ');\r
+        }\r
+        return results;\r
+      })()).join('');\r
+      if (fromTo === 'opening->closing') {\r
+        formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';\r
+      } else {\r
+        formatted += padding + ln + '\n';\r
+      }\r
+    };\r
+    for (l = 0, len = lines.length; l < len; l++) {\r
+      ln = lines[l];\r
+      fn(ln);\r
+    }\r
+    return formatted;\r
+  },\r
+\r
+  // puts the response data in UI\r
+  showStatus: function(response) {\r
+    var url, content;\r
+    if (response.content === undefined) {\r
+      content = response.data;\r
+      url = response.url;\r
+    } else {\r
+      content = response.content.data;\r
+      url = response.request.url;\r
+    }\r
+    var headers = response.headers;\r
+    content = jQuery.trim(content);\r
+\r
+    // if server is nice, and sends content-type back, we can use it\r
+    var contentType = null;\r
+    if (headers) {\r
+      contentType = headers['Content-Type'] || headers['content-type'];\r
+      if (contentType) {\r
+        contentType = contentType.split(';')[0].trim();\r
+      }\r
+    }\r
+    $('.response_body', $(this.el)).removeClass('json');\r
+    $('.response_body', $(this.el)).removeClass('xml');\r
+\r
+    var supportsAudioPlayback = function(contentType){\r
+      var audioElement = document.createElement('audio');\r
+      return !!(audioElement.canPlayType && audioElement.canPlayType(contentType).replace(/no/, ''));\r
+    };\r
+\r
+    var pre;\r
+    var code;\r
+    if (!content) {\r
+      code = $('<code />').text('no content');\r
+      pre = $('<pre class="json" />').append(code);\r
+\r
+      // JSON\r
+    } else if (contentType === 'application/json' || /\+json$/.test(contentType)) {\r
+      var json = null;\r
+      try {\r
+        json = JSON.stringify(JSON.parse(content), null, '  ');\r
+      } catch (_error) {\r
+        json = 'can\'t parse JSON.  Raw result:\n\n' + content;\r
+      }\r
+      code = $('<code />').text(json);\r
+      pre = $('<pre class="json" />').append(code);\r
+\r
+      // XML\r
+    } else if (contentType === 'application/xml' || /\+xml$/.test(contentType)) {\r
+      code = $('<code />').text(this.formatXml(content));\r
+      pre = $('<pre class="xml" />').append(code);\r
+\r
+      // HTML\r
+    } else if (contentType === 'text/html') {\r
+      code = $('<code />').html(_.escape(content));\r
+      pre = $('<pre class="xml" />').append(code);\r
+\r
+      // Plain Text\r
+    } else if (/text\/plain/.test(contentType)) {\r
+      code = $('<code />').text(content);\r
+      pre = $('<pre class="plain" />').append(code);\r
+\r
+\r
+      // Image\r
+    } else if (/^image\//.test(contentType)) {\r
+      pre = $('<img>').attr('src', url);\r
+\r
+      // Audio\r
+    } else if (/^audio\//.test(contentType) && supportsAudioPlayback(contentType)) {\r
+      pre = $('<audio controls>').append($('<source>').attr('src', url).attr('type', contentType));\r
+\r
+      // Download\r
+    } else if (headers['Content-Disposition'] && (/attachment/).test(headers['Content-Disposition']) ||\r
+        headers['content-disposition'] && (/attachment/).test(headers['content-disposition']) ||\r
+        headers['Content-Description'] && (/File Transfer/).test(headers['Content-Description']) ||\r
+        headers['content-description'] && (/File Transfer/).test(headers['content-description'])) {\r
+\r
+      if ('Blob' in window) {\r
+        var type = contentType || 'text/html';\r
+        var blob = new Blob([content], {type: type});\r
+        var a = document.createElement('a');\r
+        var href = window.URL.createObjectURL(blob);\r
+        var fileName = response.url.substr(response.url.lastIndexOf('/') + 1);\r
+        var download = [type, fileName, href].join(':');\r
+\r
+        // Use filename from response header\r
+        var disposition = headers['content-disposition'] || headers['Content-Disposition'];\r
+        if(typeof disposition !== 'undefined') {\r
+          var responseFilename = /filename=([^;]*);?/.exec(disposition);\r
+          if(responseFilename !== null && responseFilename.length > 1) {\r
+            download = responseFilename[1];\r
+          }\r
+        }\r
+\r
+        a.setAttribute('href', href);\r
+        a.setAttribute('download', download);\r
+        a.innerText = 'Download ' + fileName;\r
+\r
+        pre = $('<div/>').append(a);\r
+      } else {\r
+        pre = $('<pre class="json" />').append('Download headers detected but your browser does not support downloading binary via XHR (Blob).');\r
+      }\r
+\r
+      // Location header based redirect download\r
+    } else if(headers.location || headers.Location) {\r
+      window.location = response.url;\r
+\r
+      // Anything else (CORS)\r
+    } else {\r
+      code = $('<code />').text(content);\r
+      pre = $('<pre class="json" />').append(code);\r
+    }\r
+    var response_body = pre;\r
+    $('.request_url', $(this.el)).html('<pre></pre>');\r
+    $('.request_url pre', $(this.el)).text(url);\r
+    $('.response_code', $(this.el)).html('<pre>' + response.status + '</pre>');\r
+    $('.response_body', $(this.el)).html(response_body);\r
+    $('.response_headers', $(this.el)).html('<pre>' + _.escape(JSON.stringify(response.headers, null, '  ')).replace(/\n/g, '<br>') + '</pre>');\r
+    $('.response', $(this.el)).slideDown();\r
+    $('.response_hider', $(this.el)).show();\r
+    $('.response_throbber', $(this.el)).hide();\r
+\r
+\r
+    // adds curl output\r
+    var curlCommand = this.model.asCurl(this.map, {responseContentType: contentType});\r
+    curlCommand = curlCommand.replace('!', '&#33;');\r
+    $( 'div.curl', $(this.el)).html('<pre>' + _.escape(curlCommand) + '</pre>');\r
+\r
+    // only highlight the response if response is less than threshold, default state is highlight response\r
+    var opts = this.options.swaggerOptions;\r
+\r
+    if (opts.showRequestHeaders) {\r
+      var form = $('.sandbox', $(this.el)),\r
+          map = this.getInputMap(form),\r
+          requestHeaders = this.model.getHeaderParams(map);\r
+      delete requestHeaders['Content-Type'];\r
+      $('.request_headers', $(this.el)).html('<pre>' + _.escape(JSON.stringify(requestHeaders, null, '  ')).replace(/\n/g, '<br>') + '</pre>');\r
+    }\r
+\r
+    var response_body_el = $('.response_body', $(this.el))[0];\r
+    // only highlight the response if response is less than threshold, default state is highlight response\r
+    if (opts.highlightSizeThreshold && typeof response.data !== 'undefined' && response.data.length > opts.highlightSizeThreshold) {\r
+      return response_body_el;\r
+    } else {\r
+      return hljs.highlightBlock(response_body_el);\r
+    }\r
+  },\r
+\r
+  toggleOperationContent: function (event) {\r
+    var elem = $('#' + Docs.escapeResourceName(this.parentId + '_' + this.nickname + '_content'));\r
+    if (elem.is(':visible')){\r
+      $.bbq.pushState('#/', 2);\r
+      event.preventDefault();\r
+      Docs.collapseOperation(elem);\r
+    } else {\r
+      Docs.expandOperation(elem);\r
+    }\r
+  },\r
+\r
+  getTextAreaValue: function(textArea) {\r
+    var param, parsed, result, i;\r
+    if (textArea.value === null || jQuery.trim(textArea.value).length === 0) {\r
+      return null;\r
+    }\r
+    param = this.getParamByName(textArea.name);\r
+    if (param && param.type && param.type.toLowerCase() === 'array') {\r
+      parsed = textArea.value.split('\n');\r
+      result = [];\r
+      for (i = 0; i < parsed.length; i++) {\r
+        if (parsed[i] !== null && jQuery.trim(parsed[i]).length > 0) {\r
+          result.push(parsed[i]);\r
+        }\r
+      }\r
+      return result.length > 0 ? result : null;\r
+    } else {\r
+      return textArea.value;\r
+    }\r
+  },\r
+\r
+  showSnippet: function () {\r
+    var contentTypeEl = this.$('[name=responseContentType]');\r
+    var xmlSnippetEl = this.$('.operation-status .snippet_xml, .response-class .snippet_xml');\r
+    var jsonSnippetEl = this.$('.operation-status .snippet_json, .response-class .snippet_json');\r
+    var contentType;\r
+\r
+    if (!contentTypeEl.length) { return; }\r
+    contentType = contentTypeEl.val();\r
+\r
+    if (contentType.indexOf('xml') > -1) {\r
+      xmlSnippetEl.show();\r
+      jsonSnippetEl.hide();\r
+    } else {\r
+      jsonSnippetEl.show();\r
+      xmlSnippetEl.hide();\r
+    }\r
+  },\r
+\r
+  getParamByName: function(name) {\r
+    var i;\r
+    if (this.model.parameters) {\r
+      for(i = 0; i < this.model.parameters.length; i++) {\r
+        if (this.model.parameters[i].name === name) {\r
+          return this.model.parameters[i];\r
+        }\r
+      }\r
+    }\r
+    return null;\r
+  }\r
+\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({\r
+  initialize: function  () {},\r
+\r
+  render: function(){\r
+    this.model.parameterContentTypeId = 'pct' + Math.random();\r
+    $(this.el).html(Handlebars.templates.parameter_content_type(this.model));\r
+    return this;\r
+  }\r
+\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.ParameterView = Backbone.View.extend({\r
+  events: {\r
+    'change [name=parameterContentType]' : 'toggleParameterSnippet'\r
+  },\r
+\r
+  initialize: function(){\r
+    Handlebars.registerHelper('isArray', function(param, opts) {\r
+      var paramType = param.type && param.type.toLowerCase();\r
+      if (paramType === 'array' || param.allowMultiple) {\r
+        return opts.fn(this);\r
+      } else {\r
+        return opts.inverse(this);\r
+      }\r
+    });\r
+  },\r
+\r
+  render: function() {\r
+    var type = this.model.type || this.model.dataType;\r
+    var modelType = this.model.modelSignature.type;\r
+    var modelDefinitions = this.model.modelSignature.definitions;\r
+    var schema = this.model.schema || {};\r
+    var consumes = this.model.consumes || [];\r
+    var sampleJSON, signatureView;\r
+\r
+\r
+    if (typeof type === 'undefined') {\r
+      if (schema.$ref) {\r
+        var ref = schema.$ref;\r
+        if (ref.indexOf('#/definitions/') === 0) {\r
+          type = ref.substring('#/definitions/'.length);\r
+        } else {\r
+          type = ref;\r
+        }\r
+      }\r
+    }\r
+\r
+    this.model.type = type;\r
+    this.model.paramType = this.model.in || this.model.paramType;\r
+    this.model.isBody = this.model.paramType === 'body' || this.model.in === 'body';\r
+    this.model.isFile = type && type.toLowerCase() === 'file';\r
+\r
+    // Allow for default === false\r
+    if(typeof this.model.default === 'undefined') {\r
+      this.model.default = this.model.defaultValue;\r
+    }\r
+\r
+    this.model.hasDefault = (typeof this.model.default !== 'undefined');\r
+    this.model.valueId = 'm' + this.model.name + Math.random();\r
+\r
+    if (this.model.allowableValues) {\r
+      this.model.isList = true;\r
+    }\r
+\r
+    var isXML = this.contains(consumes, 'xml');\r
+    var isJSON = isXML ? this.contains(consumes, 'json') : true;\r
+    sampleJSON = SwaggerUi.partials.signature.createParameterJSONSample(modelType, modelDefinitions);\r
+\r
+    var template = this.template();\r
+    $(this.el).html(template(this.model));\r
+\r
+    var signatureModel = {\r
+      sampleJSON: isJSON ? sampleJSON : false,\r
+      sampleXML: sampleJSON && isXML ? SwaggerUi.partials.signature.createXMLSample('', schema, modelDefinitions, true) : false,\r
+      isParam: true,\r
+      signature: SwaggerUi.partials.signature.getParameterModelSignature(modelType, modelDefinitions),\r
+      defaultRendering: this.model.defaultRendering\r
+    };\r
+\r
+    if (sampleJSON) {\r
+      signatureView = new SwaggerUi.Views.SignatureView({model: signatureModel, tagName: 'div'});\r
+      $('.model-signature', $(this.el)).append(signatureView.render().el);\r
+    }\r
+    else {\r
+      $('.model-signature', $(this.el)).html(this.model.signature);\r
+    }\r
+\r
+    var isParam = false;\r
+\r
+    if( this.options.swaggerOptions.jsonEditor && this.model.isBody && this.model.schema){\r
+      var $self = $(this.el);\r
+      this.model.jsonEditor =\r
+        /* global JSONEditor */\r
+        new JSONEditor($('.editor_holder', $self)[0],\r
+                       {schema: this.model.schema, startval : this.model.default,\r
+                        ajax:true,\r
+                        disable_properties:true,\r
+                        disable_edit_json:true,\r
+                        iconlib: 'swagger' });\r
+      // This is so that the signature can send back the sample to the json editor\r
+      // TODO: SignatureView should expose an event "onSampleClicked" instead\r
+      signatureModel.jsonEditor = this.model.jsonEditor;\r
+      $('.body-textarea', $self).hide();\r
+      $('.editor_holder', $self).show();\r
+      $('.parameter-content-type', $self)\r
+        .change(function(e){\r
+            if(e.target.value === 'application/xml'){\r
+              $('.body-textarea', $self).show();\r
+              $('.editor_holder', $self).hide();\r
+              this.model.jsonEditor.disable();\r
+            }\r
+            else {\r
+              $('.body-textarea', $self).hide();\r
+              $('.editor_holder', $self).show();\r
+              this.model.jsonEditor.enable();\r
+            }\r
+        });\r
+      }\r
+\r
+\r
+    if (this.model.isBody) {\r
+      isParam = true;\r
+    }\r
+\r
+    var contentTypeModel = {\r
+      isParam: isParam\r
+    };\r
+\r
+    contentTypeModel.consumes = this.model.consumes;\r
+\r
+    if (isParam) {\r
+      var parameterContentTypeView = new SwaggerUi.Views.ParameterContentTypeView({model: contentTypeModel});\r
+      $('.parameter-content-type', $(this.el)).append(parameterContentTypeView.render().el);\r
+      this.toggleParameterSnippet();\r
+    }\r
+\r
+    else {\r
+      var responseContentTypeView = new SwaggerUi.Views.ResponseContentTypeView({model: contentTypeModel});\r
+      $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);\r
+      this.toggleResponseSnippet();\r
+    }\r
+\r
+    return this;\r
+  },\r
+\r
+  contains: function (consumes, type) {\r
+    return consumes.filter(function (val) {\r
+      if (val.indexOf(type) > -1) {\r
+        return true;\r
+      }\r
+    }).length;\r
+  },\r
+\r
+  toggleParameterSnippet: function () {\r
+    var contentType = this.$('[name=parameterContentType]').val();\r
+\r
+    this.toggleSnippet(contentType);\r
+  },\r
+\r
+  toggleResponseSnippet: function () {\r
+    var contentEl = this.$('[name=responseContentType]');\r
+\r
+    if (!contentEl.length) { return; }\r
+\r
+    this.toggleSnippet(contentEl.val());\r
+  },\r
+\r
+  toggleSnippet: function (type) {\r
+    type = type || '';\r
+    if (type.indexOf('xml') > -1) {\r
+      this.$('.snippet_xml').show();\r
+      this.$('.snippet_json').hide();\r
+    } else {\r
+      this.$('.snippet_json').show();\r
+      this.$('.snippet_xml').hide();\r
+    }\r
+  },\r
+\r
+  // Return an appropriate template based on if the parameter is a list, readonly, required\r
+  template: function(){\r
+    if (this.model.isList) {\r
+      return Handlebars.templates.param_list;\r
+    } else {\r
+      if (this.options.readOnly) {\r
+        if (this.model.required) {\r
+          return Handlebars.templates.param_readonly_required;\r
+        } else {\r
+          return Handlebars.templates.param_readonly;\r
+        }\r
+      } else {\r
+        if (this.model.required) {\r
+          return Handlebars.templates.param_required;\r
+        } else {\r
+          return Handlebars.templates.param;\r
+        }\r
+      }\r
+    }\r
+  }\r
+});\r
+\r
+'use strict';\r
+\r
+/* jshint -W122 */\r
+SwaggerUi.partials.signature = (function () {\r
+  // copy-pasted from swagger-js\r
+  var resolveSchema = function (schema) {\r
+    if (_.isPlainObject(schema.schema)) {\r
+      schema = resolveSchema(schema.schema);\r
+    }\r
+\r
+    return schema;\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var simpleRef = function (name) {\r
+    if (typeof name === 'undefined') {\r
+      return null;\r
+    }\r
+\r
+    if (name.indexOf('#/definitions/') === 0) {\r
+      return name.substring('#/definitions/'.length);\r
+    } else {\r
+      return name;\r
+    }\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var getInlineModel = function(inlineStr) {\r
+    if(/^Inline Model \d+$/.test(inlineStr) && this.inlineModels) {\r
+      var id = parseInt(inlineStr.substr('Inline Model'.length).trim(),10); //\r
+      var model = this.inlineModels[id];\r
+      return model;\r
+    }\r
+    // I'm returning null here, should I rather throw an error?\r
+    return null;\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var formatXml = function(xml) {\r
+    var contexp, fn, formatted, indent, l, lastType, len, lines, ln, pad, reg, transitions, wsexp;\r
+    reg = /(>)(<)(\/*)/g;\r
+    wsexp = /[ ]*(.*)[ ]+\n/g;\r
+    contexp = /(<.+>)(.+\n)/g;\r
+    xml = xml.replace(reg, '$1\n$2$3').replace(wsexp, '$1\n').replace(contexp, '$1\n$2');\r
+    pad = 0;\r
+    formatted = '';\r
+    lines = xml.split('\n');\r
+    indent = 0;\r
+    lastType = 'other';\r
+    transitions = {\r
+      'single->single': 0,\r
+      'single->closing': -1,\r
+      'single->opening': 0,\r
+      'single->other': 0,\r
+      'closing->single': 0,\r
+      'closing->closing': -1,\r
+      'closing->opening': 0,\r
+      'closing->other': 0,\r
+      'opening->single': 1,\r
+      'opening->closing': 0,\r
+      'opening->opening': 1,\r
+      'opening->other': 1,\r
+      'other->single': 0,\r
+      'other->closing': -1,\r
+      'other->opening': 0,\r
+      'other->other': 0\r
+    };\r
+    fn = function(ln) {\r
+      var fromTo, j, key, padding, type, types, value;\r
+      types = {\r
+        single: Boolean(ln.match(/<.+\/>/)),\r
+        closing: Boolean(ln.match(/<\/.+>/)),\r
+        opening: Boolean(ln.match(/<[^!?].*>/))\r
+      };\r
+      type = ((function() {\r
+        var results;\r
+        results = [];\r
+        for (key in types) {\r
+          value = types[key];\r
+          if (value) {\r
+            results.push(key);\r
+          }\r
+        }\r
+        return results;\r
+      })())[0];\r
+      type = type === void 0 ? 'other' : type;\r
+      fromTo = lastType + '->' + type;\r
+      lastType = type;\r
+      padding = '';\r
+      indent += transitions[fromTo];\r
+      padding = ((function() {\r
+        var m, ref1, results;\r
+        results = [];\r
+        for (j = m = 0, ref1 = indent; 0 <= ref1 ? m < ref1 : m > ref1; j = 0 <= ref1 ? ++m : --m) {\r
+          results.push('  ');\r
+        }\r
+        return results;\r
+      })()).join('');\r
+      if (fromTo === 'opening->closing') {\r
+        formatted = formatted.substr(0, formatted.length - 1) + ln + '\n';\r
+      } else {\r
+        formatted += padding + ln + '\n';\r
+      }\r
+    };\r
+    for (l = 0, len = lines.length; l < len; l++) {\r
+      ln = lines[l];\r
+      fn(ln);\r
+    }\r
+    return formatted;\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var getModelSignature = function (name, schema, models, modelPropertyMacro) {\r
+    var strongOpen = '<span class="strong">';\r
+    var strongClose = '</span>';\r
+\r
+    var optionHtml = function (label, value) {\r
+      return '<tr><td class="optionName">' + label + ':</td><td>' + value + '</td></tr>';\r
+    };\r
+\r
+\r
+    // Allow for ignoring the 'name' argument.... shifting the rest\r
+    if(_.isObject(arguments[0])) {\r
+      name = void 0;\r
+      schema = arguments[0];\r
+      models = arguments[1];\r
+      modelPropertyMacro = arguments[2];\r
+    }\r
+\r
+    models = models || {};\r
+\r
+    // Resolve the schema (Handle nested schemas)\r
+    schema = resolveSchema(schema);\r
+\r
+    // Return for empty object\r
+    if(_.isEmpty(schema)) {\r
+      return strongOpen + 'Empty' + strongClose;\r
+    }\r
+\r
+    // Dereference $ref from 'models'\r
+    if(typeof schema.$ref === 'string') {\r
+      name = simpleRef(schema.$ref);\r
+      schema = models[name];\r
+      if(typeof schema === 'undefined')\r
+      {\r
+        return strongOpen + name + ' is not defined!' + strongClose;\r
+      }\r
+    }\r
+\r
+    if(typeof name !== 'string') {\r
+      name = schema.title || 'Inline Model';\r
+    }\r
+\r
+    // If we are a Model object... adjust accordingly\r
+    if(schema.definition) {\r
+      schema = schema.definition;\r
+    }\r
+\r
+    if(typeof modelPropertyMacro !== 'function') {\r
+      modelPropertyMacro = function(prop){\r
+        return (prop || {}).default;\r
+      };\r
+    }\r
+\r
+    var references = {};\r
+    var seenModels = [];\r
+    var inlineModels = 0;\r
+\r
+    // Generate current HTML\r
+    var html = processModel(schema, name);\r
+\r
+    // Generate references HTML\r
+    while (_.keys(references).length > 0) {\r
+      /* jshint ignore:start */\r
+      _.forEach(references, function (schema, name) {\r
+        var seenModel = _.indexOf(seenModels, name) > -1;\r
+\r
+        delete references[name];\r
+\r
+        if (!seenModel) {\r
+          seenModels.push(name);\r
+\r
+          html += '<br />' + processModel(schema, name);\r
+        }\r
+      });\r
+      /* jshint ignore:end */\r
+    }\r
+\r
+    return html;\r
+\r
+\r
+    function addReference(schema, name, skipRef) {\r
+      var modelName = name;\r
+      var model;\r
+\r
+      if (schema.$ref) {\r
+        modelName = schema.title || simpleRef(schema.$ref);\r
+        model = models[simpleRef(schema.$ref)];\r
+      } else if (_.isUndefined(name)) {\r
+        modelName = schema.title || 'Inline Model ' + (++inlineModels);\r
+        model = {definition: schema};\r
+      }\r
+\r
+      if (skipRef !== true) {\r
+        references[modelName] = _.isUndefined(model) ? {} : model.definition;\r
+      }\r
+\r
+      return modelName;\r
+    }\r
+\r
+    function primitiveToHTML(schema) {\r
+      var html = '<span class="propType">';\r
+      var type = schema.type || 'object';\r
+\r
+      if (schema.$ref) {\r
+        html += addReference(schema, simpleRef(schema.$ref));\r
+      } else if (type === 'object') {\r
+        if (!_.isUndefined(schema.properties)) {\r
+          html += addReference(schema);\r
+        } else {\r
+          html += 'object';\r
+        }\r
+      } else if (type === 'array') {\r
+        html += 'Array[';\r
+\r
+        if (_.isArray(schema.items)) {\r
+          html += _.map(schema.items, addReference).join(',');\r
+        } else if (_.isPlainObject(schema.items)) {\r
+          if (_.isUndefined(schema.items.$ref)) {\r
+            if (!_.isUndefined(schema.items.type) && _.indexOf(['array', 'object'], schema.items.type) === -1) {\r
+              html += schema.items.type;\r
+            } else {\r
+              html += addReference(schema.items);\r
+            }\r
+          } else {\r
+            html += addReference(schema.items, simpleRef(schema.items.$ref));\r
+          }\r
+        } else {\r
+          console.log('Array type\'s \'items\' schema is not an array or an object, cannot process');\r
+          html += 'object';\r
+        }\r
+\r
+        html += ']';\r
+      } else {\r
+        html += schema.type;\r
+      }\r
+\r
+      html += '</span>';\r
+\r
+      return html;\r
+    }\r
+\r
+    function primitiveToOptionsHTML(schema, html) {\r
+      var options = '';\r
+      var type = schema.type || 'object';\r
+      var isArray = type === 'array';\r
+\r
+      if (isArray) {\r
+        if (_.isPlainObject(schema.items) && !_.isUndefined(schema.items.type)) {\r
+          type = schema.items.type;\r
+        } else {\r
+          type = 'object';\r
+        }\r
+      }\r
+\r
+      if (!_.isUndefined(schema.default)) {\r
+        options += optionHtml('Default', schema.default);\r
+      }\r
+\r
+      switch (type) {\r
+      case 'string':\r
+        if (schema.minLength) {\r
+          options += optionHtml('Min. Length', schema.minLength);\r
+        }\r
+\r
+        if (schema.maxLength) {\r
+          options += optionHtml('Max. Length', schema.maxLength);\r
+        }\r
+\r
+        if (schema.pattern) {\r
+          options += optionHtml('Reg. Exp.', schema.pattern);\r
+        }\r
+        break;\r
+      case 'integer':\r
+      case 'number':\r
+        if (schema.minimum) {\r
+          options += optionHtml('Min. Value', schema.minimum);\r
+        }\r
+\r
+        if (schema.exclusiveMinimum) {\r
+          options += optionHtml('Exclusive Min.', 'true');\r
+        }\r
+\r
+        if (schema.maximum) {\r
+          options += optionHtml('Max. Value', schema.maximum);\r
+        }\r
+\r
+        if (schema.exclusiveMaximum) {\r
+          options += optionHtml('Exclusive Max.', 'true');\r
+        }\r
+\r
+        if (schema.multipleOf) {\r
+          options += optionHtml('Multiple Of', schema.multipleOf);\r
+        }\r
+\r
+        break;\r
+      }\r
+\r
+      if (isArray) {\r
+        if (schema.minItems) {\r
+          options += optionHtml('Min. Items', schema.minItems);\r
+        }\r
+\r
+        if (schema.maxItems) {\r
+          options += optionHtml('Max. Items', schema.maxItems);\r
+        }\r
+\r
+        if (schema.uniqueItems) {\r
+          options += optionHtml('Unique Items', 'true');\r
+        }\r
+\r
+        if (schema.collectionFormat) {\r
+          options += optionHtml('Coll. Format', schema.collectionFormat);\r
+        }\r
+      }\r
+\r
+      if (_.isUndefined(schema.items)) {\r
+        if (_.isArray(schema.enum)) {\r
+          var enumString;\r
+\r
+          if (type === 'number' || type === 'integer') {\r
+            enumString = schema.enum.join(', ');\r
+          } else {\r
+            enumString = '"' + schema.enum.join('", "') + '"';\r
+          }\r
+\r
+          options += optionHtml('Enum', enumString);\r
+        }\r
+      }\r
+\r
+      if (options.length > 0) {\r
+        html = '<span class="propWrap">' + html + '<table class="optionsWrapper"><tr><th colspan="2">' + type + '</th></tr>' + options + '</table></span>';\r
+      }\r
+\r
+      return html;\r
+    }\r
+\r
+    function processModel(schema, name) {\r
+      var type = schema.type || 'object';\r
+      var isArray = schema.type === 'array';\r
+      var html = strongOpen + name + ' ' + (isArray ? '[' : '{') + strongClose;\r
+      var contents;\r
+\r
+      if (name) {\r
+        seenModels.push(name);\r
+      }\r
+\r
+      if (isArray) {\r
+        if (_.isArray(schema.items)) {\r
+          html += '<div>' + _.map(schema.items, function (item) {\r
+            var type = item.type || 'object';\r
+\r
+            if (_.isUndefined(item.$ref)) {\r
+              if (_.indexOf(['array', 'object'], type) > -1) {\r
+                if (type === 'object' && _.isUndefined(item.properties)) {\r
+                  return 'object';\r
+                } else {\r
+                  return addReference(item);\r
+                }\r
+              } else {\r
+                return primitiveToOptionsHTML(item, type);\r
+              }\r
+            } else {\r
+              return addReference(item, simpleRef(item.$ref));\r
+            }\r
+          }).join(',</div><div>');\r
+        } else if (_.isPlainObject(schema.items)) {\r
+          if (_.isUndefined(schema.items.$ref)) {\r
+            if (_.indexOf(['array', 'object'], schema.items.type || 'object') > -1) {\r
+              if ((_.isUndefined(schema.items.type) || schema.items.type === 'object') && _.isUndefined(schema.items.properties)) {\r
+                html += '<div>object</div>';\r
+              } else {\r
+                html += '<div>' + addReference(schema.items) + '</div>';\r
+              }\r
+            } else {\r
+              html += '<div>' + primitiveToOptionsHTML(schema.items, schema.items.type) + '</div>';\r
+            }\r
+          } else {\r
+            html += '<div>' + addReference(schema.items, simpleRef(schema.items.$ref)) + '</div>';\r
+          }\r
+        } else {\r
+          console.log('Array type\'s \'items\' property is not an array or an object, cannot process');\r
+          html += '<div>object</div>';\r
+        }\r
+      } else {\r
+        if (schema.$ref) {\r
+          html += '<div>' + addReference(schema, name) + '</div>';\r
+        } else if (type === 'object') {\r
+          if (_.isPlainObject(schema.properties)) {\r
+            contents = _.map(schema.properties, function (property, name) {\r
+              var propertyIsRequired = (_.indexOf(schema.required, name) >= 0);\r
+              var cProperty = _.cloneDeep(property);\r
+\r
+              var requiredClass = propertyIsRequired ? 'required' : '';\r
+              var html = '<span class="propName ' + requiredClass + '">' + name + '</span> (';\r
+              var model;\r
+              var propDescription;\r
+\r
+              // Allow macro to set the default value\r
+              cProperty.default = modelPropertyMacro(cProperty);\r
+\r
+              // Resolve the schema (Handle nested schemas)\r
+              cProperty = resolveSchema(cProperty);\r
+\r
+              propDescription = property.description || cProperty.description;\r
+\r
+              // We need to handle property references to primitives (Issue 339)\r
+              if (!_.isUndefined(cProperty.$ref)) {\r
+                model = models[simpleRef(cProperty.$ref)];\r
+\r
+                if (!_.isUndefined(model) && _.indexOf([undefined, 'array', 'object'], model.definition.type) === -1) {\r
+                  // Use referenced schema\r
+                  cProperty = resolveSchema(model.definition);\r
+                }\r
+              }\r
+\r
+              html += primitiveToHTML(cProperty);\r
+\r
+              if(!propertyIsRequired) {\r
+                html += ', <span class="propOptKey">optional</span>';\r
+              }\r
+\r
+              if(property.readOnly) {\r
+                  html += ', <span class="propReadOnly">read only</span>';\r
+              }\r
+\r
+              html += ')';\r
+\r
+              if (!_.isUndefined(propDescription)) {\r
+                html += ': ' + '<span class="propDesc">' + propDescription + '</span>';\r
+              }\r
+\r
+              if (cProperty.enum) {\r
+                html += ' = <span class="propVals">[\'' + cProperty.enum.join('\', \'') + '\']</span>';\r
+              }\r
+\r
+              return '<div' + (property.readOnly ? ' class="readOnly"' : '') + '>' + primitiveToOptionsHTML(cProperty, html);\r
+            }).join(',</div>');\r
+          }\r
+\r
+          if (contents) {\r
+            html += contents + '</div>';\r
+          }\r
+        } else {\r
+          html += '<div>' + primitiveToOptionsHTML(schema, type) + '</div>';\r
+        }\r
+      }\r
+\r
+      return html + strongOpen + (isArray ? ']' : '}') + strongClose;\r
+    }\r
+\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var schemaToJSON = function (schema, models, modelsToIgnore, modelPropertyMacro) {\r
+    // Resolve the schema (Handle nested schemas)\r
+    schema = resolveSchema(schema);\r
+\r
+    if(typeof modelPropertyMacro !== 'function') {\r
+      modelPropertyMacro = function(prop){\r
+        return (prop || {}).default;\r
+      };\r
+    }\r
+\r
+    modelsToIgnore= modelsToIgnore || {};\r
+\r
+    var type = schema.type || 'object';\r
+    var format = schema.format;\r
+    var model;\r
+    var output;\r
+\r
+    if (!_.isUndefined(schema.example)) {\r
+      output = schema.example;\r
+    } else if (_.isUndefined(schema.items) && _.isArray(schema.enum)) {\r
+      output = schema.enum[0];\r
+    }\r
+\r
+    if (_.isUndefined(output)) {\r
+      if (schema.$ref) {\r
+        model = models[simpleRef(schema.$ref)];\r
+\r
+        if (!_.isUndefined(model)) {\r
+          if (_.isUndefined(modelsToIgnore[model.name])) {\r
+            modelsToIgnore[model.name] = model;\r
+            output = schemaToJSON(model.definition, models, modelsToIgnore, modelPropertyMacro);\r
+            delete modelsToIgnore[model.name];\r
+          } else {\r
+            if (model.type === 'array') {\r
+              output = [];\r
+            } else {\r
+              output = {};\r
+            }\r
+          }\r
+        }\r
+      } else if (!_.isUndefined(schema.default)) {\r
+        output = schema.default;\r
+      } else if (type === 'string') {\r
+        if (format === 'date-time') {\r
+          output = new Date().toISOString();\r
+        } else if (format === 'date') {\r
+          output = new Date().toISOString().split('T')[0];\r
+        } else {\r
+          output = 'string';\r
+        }\r
+      } else if (type === 'integer') {\r
+        output = 0;\r
+      } else if (type === 'number') {\r
+        output = 0.0;\r
+      } else if (type === 'boolean') {\r
+        output = true;\r
+      } else if (type === 'object') {\r
+        output = {};\r
+\r
+        _.forEach(schema.properties, function (property, name) {\r
+          var cProperty = _.cloneDeep(property);\r
+\r
+          // Allow macro to set the default value\r
+          cProperty.default = modelPropertyMacro(property);\r
+\r
+          output[name] = schemaToJSON(cProperty, models, modelsToIgnore, modelPropertyMacro);\r
+        });\r
+      } else if (type === 'array') {\r
+        output = [];\r
+\r
+        if (_.isArray(schema.items)) {\r
+          _.forEach(schema.items, function (item) {\r
+            output.push(schemaToJSON(item, models, modelsToIgnore, modelPropertyMacro));\r
+          });\r
+        } else if (_.isPlainObject(schema.items)) {\r
+          output.push(schemaToJSON(schema.items, models, modelsToIgnore, modelPropertyMacro));\r
+        } else if (_.isUndefined(schema.items)) {\r
+          output.push({});\r
+        } else {\r
+          console.log('Array type\'s \'items\' property is not an array or an object, cannot process');\r
+        }\r
+      }\r
+    }\r
+\r
+    return output;\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var createJSONSample = function (value, modelsToIgnore) {\r
+    modelsToIgnore = modelsToIgnore || {};\r
+\r
+    modelsToIgnore[value.name] = value;\r
+\r
+    // Response support\r
+    if (value.examples && _.isPlainObject(value.examples) && value.examples['application/json']) {\r
+      value.definition.example = value.examples['application/json'];\r
+\r
+      if (_.isString(value.definition.example)) {\r
+        value.definition.example = jsyaml.safeLoad(value.definition.example);\r
+      }\r
+    } else if (!value.definition.example) {\r
+      value.definition.example = value.examples;\r
+    }\r
+\r
+    return schemaToJSON(value.definition, value.models, modelsToIgnore, value.modelPropertyMacro);\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var getParameterModelSignature = function (type, definitions) {\r
+      var isPrimitive, listType;\r
+\r
+      if (type instanceof Array) {\r
+        listType = true;\r
+        type = type[0];\r
+      }\r
+\r
+      // Convert undefined to string of 'undefined'\r
+      if (typeof type === 'undefined') {\r
+        type = 'undefined';\r
+        isPrimitive = true;\r
+\r
+      } else if (definitions[type]){\r
+        // a model def exists?\r
+        type = definitions[type]; /* Model */\r
+        isPrimitive = false;\r
+\r
+      } else if (getInlineModel(type)) {\r
+        type = getInlineModel(type); /* Model */\r
+        isPrimitive = false;\r
+\r
+      } else {\r
+        // We default to primitive\r
+        isPrimitive = true;\r
+      }\r
+\r
+      if (isPrimitive) {\r
+        if (listType) {\r
+          return 'Array[' + type + ']';\r
+        } else {\r
+          return type.toString();\r
+        }\r
+      } else {\r
+        if (listType) {\r
+          return 'Array[' + getModelSignature(type.name, type.definition, type.models, type.modelPropertyMacro) + ']';\r
+        } else {\r
+          return getModelSignature(type.name, type.definition, type.models, type.modelPropertyMacro);\r
+        }\r
+      }\r
+  };\r
+\r
+  // copy-pasted from swagger-js\r
+  var createParameterJSONSample = function (type, models) {\r
+    var listType, sampleJson, innerType;\r
+    models = models || {};\r
+\r
+    listType = (type instanceof Array);\r
+    innerType = listType ? type[0] : type;\r
+\r
+    if(models[innerType]) {\r
+      sampleJson = createJSONSample(models[innerType]);\r
+    } else if (getInlineModel(innerType)){\r
+      sampleJson = createJSONSample(getInlineModel(innerType)); // may return null, if type isn't correct\r
+    }\r
+\r
+\r
+    if (sampleJson) {\r
+      sampleJson = listType ? [sampleJson] : sampleJson;\r
+\r
+      if (typeof sampleJson === 'string') {\r
+        return sampleJson;\r
+      } else if (_.isObject(sampleJson)) {\r
+        var t = sampleJson;\r
+\r
+        if (sampleJson instanceof Array && sampleJson.length > 0) {\r
+          t = sampleJson[0];\r
+        }\r
+\r
+        if (t.nodeName && typeof t === 'Node') {\r
+          var xmlString = new XMLSerializer().serializeToString(t);\r
+\r
+          return formatXml(xmlString);\r
+        } else {\r
+          return JSON.stringify(sampleJson, null, 2);\r
+        }\r
+      } else {\r
+        return sampleJson;\r
+      }\r
+    }\r
+  };\r
+\r
+  var wrapTag = function (name, value, attrs) {\r
+    var str, attributes;\r
+\r
+    attrs = attrs || [];\r
+\r
+    attributes = attrs.map(function (attr) {\r
+      return ' ' + attr.name + '="' + attr.value + '"';\r
+    }).join('');\r
+\r
+    if (!name) {\r
+      return getErrorMessage('Node name is not provided');\r
+    }\r
+\r
+    str = [\r
+      '<', name,\r
+      attributes,\r
+      '>',\r
+      value,\r
+      '</', name, '>'\r
+    ];\r
+\r
+    return str.join('');\r
+  };\r
+\r
+  var getName = function (name, xml) {\r
+    var result = name || '';\r
+\r
+    xml = xml || {};\r
+\r
+    if (xml.name) {\r
+      result = xml.name;\r
+    }\r
+\r
+    if (xml.prefix) {\r
+      result = xml.prefix + ':' + result;\r
+    }\r
+\r
+    return result;\r
+  };\r
+\r
+  var getNamespace = function (xml) {\r
+    var namespace = '';\r
+    var name = 'xmlns';\r
+\r
+    xml = xml || {};\r
+\r
+    if (xml.namespace) {\r
+      namespace = xml.namespace;\r
+    } else {\r
+      return namespace;\r
+    }\r
+\r
+    if (xml.prefix) {\r
+      name += ':' + xml.prefix;\r
+    }\r
+\r
+    return {\r
+      name: name,\r
+      value: namespace\r
+    };\r
+  };\r
+\r
+  var createArrayXML = function (descriptor) {\r
+    var name = descriptor.name;\r
+    var config = descriptor.config;\r
+    var definition = descriptor.definition;\r
+    var models = descriptor.models;\r
+    var value;\r
+    var items = definition.items;\r
+    var xml = definition.xml || {};\r
+\r
+    if (!items) { return getErrorMessage(); }\r
+\r
+    value = createSchemaXML(name, items, models, config);\r
+\r
+    xml = xml || {};\r
+\r
+    if (xml.wrapped) {\r
+      value = wrapTag(name, value);\r
+    }\r
+\r
+    return value;\r
+  };\r
+\r
+  var getPrimitiveSignature = function (schema) {\r
+    var type, items;\r
+\r
+    schema = schema || {};\r
+    items = schema.items || {};\r
+    type = schema.type || '';\r
+\r
+    switch (type) {\r
+      case 'object': return 'Object is not a primitive';\r
+      case 'array' : return 'Array[' + (items.format || items.type) + ']';\r
+      default: return schema.format || type;\r
+    }\r
+  };\r
+\r
+  var createPrimitiveXML = function (descriptor) {\r
+    var name = descriptor.name;\r
+    var definition = descriptor.definition;\r
+    var primitivesMap = {\r
+      'string': {\r
+        'date': new Date(1).toISOString().split('T')[0],\r
+        'date-time' : new Date(1).toISOString(),\r
+        'default': 'string'\r
+      },\r
+      'integer': {\r
+        'default': 1\r
+      },\r
+      'number': {\r
+        'default': 1.1\r
+      },\r
+      'boolean': {\r
+        'default': true\r
+      }\r
+    };\r
+    var type = definition.type;\r
+    var format = definition.format;\r
+    var xml = definition.xml || {};\r
+    var namespace = getNamespace(xml);\r
+    var attributes = [];\r
+    var value;\r
+\r
+    if (_.keys(primitivesMap).indexOf(type) < 0) { return getErrorMessage(); }\r
+\r
+    if (_.isArray(definition.enum)){\r
+      value = definition.enum[0];\r
+    } else {\r
+      value = definition.example || primitivesMap[type][format] || primitivesMap[type].default;\r
+    }\r
+\r
+    if (xml.attribute) {\r
+      return {name: name, value: value};\r
+    }\r
+\r
+    if (namespace) {\r
+      attributes.push(namespace);\r
+    }\r
+\r
+    return wrapTag(name, value, attributes);\r
+  };\r
+\r
+  function createObjectXML (descriptor) {\r
+    var name = descriptor.name;\r
+    var definition = descriptor.definition;\r
+    var config = descriptor.config;\r
+    var models = descriptor.models;\r
+    var isParam = descriptor.config.isParam;\r
+    var serializedProperties;\r
+    var attrs = [];\r
+    var properties = definition.properties;\r
+    var additionalProperties = definition.additionalProperties;\r
+    var xml = definition.xml;\r
+    var namespace = getNamespace(xml);\r
+\r
+    if (namespace) {\r
+      attrs.push(namespace);\r
+    }\r
+\r
+    if (!properties && !additionalProperties) { return getErrorMessage(); }\r
+\r
+    properties = properties || {};\r
+\r
+    serializedProperties = _.map(properties, function (prop, key) {\r
+      var xml, result;\r
+\r
+      if (isParam && prop.readOnly) {\r
+        return '';\r
+      }\r
+\r
+      xml = prop.xml || {};\r
+      result = createSchemaXML(key, prop, models, config);\r
+\r
+      if (xml.attribute) {\r
+        attrs.push(result);\r
+        return '';\r
+      }\r
+\r
+      return result;\r
+    }).join('');\r
+\r
+    if (additionalProperties) {\r
+      serializedProperties += '<!-- additional elements allowed -->';\r
+    }\r
+\r
+    return wrapTag(name, serializedProperties, attrs);\r
+  }\r
+\r
+  function getInfiniteLoopMessage (name) {\r
+    return '<!-- Infinite loop $ref:' + name + ' -->';\r
+  }\r
+\r
+  function getErrorMessage (details) {\r
+    details = details ? ': ' + details : '';\r
+    return '<!-- invalid XML' + details + ' -->';\r
+  }\r
+\r
+  function createSchemaXML (name, definition, models, config) {\r
+    var $ref = _.isObject(definition) ? definition.$ref : null;\r
+    var output, index;\r
+    config = config || {};\r
+    config.modelsToIgnore = config.modelsToIgnore || [];\r
+    var descriptor = _.isString($ref) ? getDescriptorByRef($ref, name, models, config)\r
+        : getDescriptor(name, definition, models, config);\r
+\r
+    if (!descriptor) {\r
+      return getErrorMessage();\r
+    }\r
+\r
+    switch (descriptor.type) {\r
+      case 'array':\r
+        output = createArrayXML(descriptor); break;\r
+      case 'object':\r
+        output = createObjectXML(descriptor); break;\r
+      case 'loop':\r
+        output = getInfiniteLoopMessage(descriptor.name); break;\r
+      default:\r
+        output = createPrimitiveXML(descriptor);\r
+    }\r
+\r
+    if ($ref) {\r
+      index = config.modelsToIgnore.indexOf($ref);\r
+      if (index > -1) {\r
+        config.modelsToIgnore.splice(index, 1);\r
+      }\r
+    }\r
+\r
+    return output;\r
+  }\r
+\r
+  function Descriptor (name, type, definition, models, config) {\r
+    if (arguments.length < 4) {\r
+      throw new Error();\r
+    }\r
+\r
+    this.config = config || {};\r
+    this.config.modelsToIgnore = this.config.modelsToIgnore || [];\r
+    this.name = getName(name, definition.xml);\r
+    this.definition = definition;\r
+    this.models = models;\r
+    this.type = type;\r
+  }\r
+\r
+  function getDescriptorByRef($ref, name, models, config) {\r
+    var modelType = simpleRef($ref);\r
+    var model = models[modelType] || {};\r
+    var type = model.definition && model.definition.type ? model.definition.type : 'object';\r
+    name = name || model.name;\r
+\r
+    if (config.modelsToIgnore.indexOf($ref) > -1) {\r
+      type = 'loop';\r
+      name = modelType;\r
+    } else {\r
+      config.modelsToIgnore.push($ref);\r
+    }\r
+\r
+    if (!model.definition) {\r
+      return null;\r
+    }\r
+\r
+    return new Descriptor(name, type, model.definition, models, config);\r
+  }\r
+\r
+  function getDescriptor (name, definition, models, config){\r
+    var type = definition.type || 'object';\r
+\r
+    if (!definition) {\r
+      return null;\r
+    }\r
+\r
+    return new Descriptor(name, type, definition, models, config);\r
+  }\r
+\r
+  function createXMLSample (name, definition, models, isParam) {\r
+    var prolog = '<?xml version="1.0"?>';\r
+\r
+    return formatXml(prolog + createSchemaXML(name, definition, models, { isParam: isParam } ));\r
+  }\r
+\r
+  return {\r
+      getModelSignature: getModelSignature,\r
+      createJSONSample: createJSONSample,\r
+      getParameterModelSignature: getParameterModelSignature,\r
+      createParameterJSONSample: createParameterJSONSample,\r
+      createSchemaXML: createSchemaXML,\r
+      createXMLSample: createXMLSample,\r
+      getPrimitiveSignature: getPrimitiveSignature\r
+  };\r
+\r
+})();\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Views.PopupView = Backbone.View.extend({\r
+    events: {\r
+        'click .api-popup-cancel': 'cancelClick'\r
+    },\r
+\r
+    template: Handlebars.templates.popup,\r
+    className: 'api-popup-dialog',\r
+\r
+    selectors: {\r
+        content: '.api-popup-content',\r
+        main   : '#swagger-ui-container'\r
+    },\r
+\r
+    initialize: function(){\r
+        this.$el.html(this.template(this.model));\r
+    },\r
+\r
+    render: function () {\r
+        this.$(this.selectors.content).append(this.model.content);\r
+        $(this.selectors.main).first().append(this.el);\r
+        this.showPopup();\r
+\r
+        return this;\r
+    },\r
+\r
+    showPopup: function () {\r
+        this.$el.show();\r
+    },\r
+\r
+    cancelClick: function () {\r
+        this.remove();\r
+    }\r
+\r
+});\r
+\r
+'use strict';\r
+\r
+SwaggerUi.Views.ResourceView = Backbone.View.extend({\r
+  initialize: function(opts) {\r
+    opts = opts || {};\r
+    this.router = opts.router;\r
+    this.auths = opts.auths;\r
+    if ('' === this.model.description) {\r
+      this.model.description = null;\r
+    }\r
+    if (this.model.description) {\r
+      this.model.summary = this.model.description;\r
+    }\r
+  },\r
+\r
+  render: function(){\r
+    var methods = {};\r
+\r
+\r
+    $(this.el).html(Handlebars.templates.resource(this.model));\r
+\r
+    // Render each operation\r
+    for (var i = 0; i < this.model.operationsArray.length; i++) {\r
+      var operation = this.model.operationsArray[i];\r
+      var counter = 0;\r
+      var id = operation.nickname;\r
+\r
+      while (typeof methods[id] !== 'undefined') {\r
+        id = id + '_' + counter;\r
+        counter += 1;\r
+      }\r
+\r
+      methods[id] = operation;\r
+\r
+      operation.nickname = id;\r
+      operation.parentId = this.model.id;\r
+      operation.definitions = this.model.definitions; // make Json Schema available for JSonEditor in this operation\r
+      this.addOperation(operation);\r
+    }\r
+\r
+    $('.toggleEndpointList', this.el).click(this.callDocs.bind(this, 'toggleEndpointListForResource'));\r
+    $('.collapseResource', this.el).click(this.callDocs.bind(this, 'collapseOperationsForResource'));\r
+    $('.expandResource', this.el).click(this.callDocs.bind(this, 'expandOperationsForResource'));\r
+\r
+    return this;\r
+  },\r
+\r
+  addOperation: function(operation) {\r
+\r
+    operation.number = this.number;\r
+\r
+    // Render an operation and add it to operations li\r
+    var operationView = new SwaggerUi.Views.OperationView({\r
+      model: operation,\r
+      router: this.router,\r
+      tagName: 'li',\r
+      className: 'endpoint',\r
+      swaggerOptions: this.options.swaggerOptions,\r
+      auths: this.auths\r
+    });\r
+\r
+    $('.endpoints', $(this.el)).append(operationView.render().el);\r
+\r
+    this.number++;\r
+\r
+  },\r
+  // Generic Event handler (`Docs` is global)\r
+\r
+\r
+  callDocs: function(fnName, e) {\r
+    e.preventDefault();\r
+    Docs[fnName](e.currentTarget.getAttribute('data-id'));\r
+  }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.ResponseContentTypeView = Backbone.View.extend({\r
+  initialize: function(){},\r
+\r
+  render: function(){\r
+    this.model.responseContentTypeId = 'rct' + Math.random();\r
+    $(this.el).html(Handlebars.templates.response_content_type(this.model));\r
+    return this;\r
+  }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.SignatureView = Backbone.View.extend({\r
+  events: {\r
+    'click a.description-link'       : 'switchToDescription',\r
+    'click a.snippet-link'           : 'switchToSnippet',\r
+    'mousedown .snippet_json'          : 'jsonSnippetMouseDown',\r
+    'mousedown .snippet_xml'          : 'xmlSnippetMouseDown'\r
+  },\r
+\r
+  initialize: function () {\r
+  },\r
+\r
+  render: function(){\r
+\r
+    $(this.el).html(Handlebars.templates.signature(this.model));\r
+\r
+    if (this.model.defaultRendering === 'model') {\r
+      this.switchToDescription();\r
+    } else {\r
+      this.switchToSnippet();\r
+    }\r
+\r
+    return this;\r
+  },\r
+\r
+  // handler for show signature\r
+  switchToDescription: function(e){\r
+    if (e) { e.preventDefault(); }\r
+\r
+    $('.snippet', $(this.el)).hide();\r
+    $('.description', $(this.el)).show();\r
+    $('.description-link', $(this.el)).addClass('selected');\r
+    $('.snippet-link', $(this.el)).removeClass('selected');\r
+  },\r
+\r
+  // handler for show sample\r
+  switchToSnippet: function(e){\r
+    if (e) { e.preventDefault(); }\r
+\r
+    $('.snippet', $(this.el)).show();\r
+    $('.description', $(this.el)).hide();\r
+    $('.snippet-link', $(this.el)).addClass('selected');\r
+    $('.description-link', $(this.el)).removeClass('selected');\r
+  },\r
+\r
+  // handler for snippet to text area\r
+  snippetToTextArea: function(val) {\r
+    var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));\r
+\r
+    // Fix for bug in IE 10/11 which causes placeholder text to be copied to "value"\r
+    if ($.trim(textArea.val()) === '' || textArea.prop('placeholder') === textArea.val()) {\r
+      textArea.val(val);\r
+      // TODO move this code outside of the view and expose an event instead\r
+      if( this.model.jsonEditor && this.model.jsonEditor.isEnabled()){\r
+        this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON));\r
+      }\r
+    }\r
+  },\r
+\r
+  jsonSnippetMouseDown: function (e) {\r
+    if (this.model.isParam) {\r
+      if (e) { e.preventDefault(); }\r
+\r
+      this.snippetToTextArea(this.model.sampleJSON);\r
+    }\r
+  },\r
+\r
+  xmlSnippetMouseDown: function (e) {\r
+    if (this.model.isParam) {\r
+      if (e) { e.preventDefault(); }\r
+\r
+      this.snippetToTextArea(this.model.sampleXML);\r
+    }\r
+  }\r
+});\r
+'use strict';\r
+\r
+SwaggerUi.Views.StatusCodeView = Backbone.View.extend({\r
+  initialize: function (opts) {\r
+    this.options = opts || {};\r
+    this.router = this.options.router;\r
+  },\r
+\r
+  render: function(){\r
+    var responseModel, responseModelView;\r
+    var value = this.router.api.models[this.model.responseModel];\r
+    $(this.el).html(Handlebars.templates.status_code(this.model));\r
+\r
+    if (this.router.api.models.hasOwnProperty(this.model.responseModel)) {\r
+      responseModel = {\r
+        sampleJSON: JSON.stringify(SwaggerUi.partials.signature.createJSONSample(value), void 0, 2),\r
+        sampleXML: this.model.isXML ? SwaggerUi.partials.signature.createXMLSample('', this.model.schema, this.router.api.models) : false,\r
+        isParam: false,\r
+        signature: SwaggerUi.partials.signature.getModelSignature(this.model.responseModel, value, this.router.api.models),\r
+        defaultRendering: this.model.defaultRendering\r
+      };\r
+    } else {\r
+      responseModel = {\r
+        signature: SwaggerUi.partials.signature.getPrimitiveSignature(this.model.schema)\r
+      };\r
+    }\r
+\r
+    responseModelView = new SwaggerUi.Views.SignatureView({model: responseModel, tagName: 'div'});\r
+    $('.model-signature', this.$el).append(responseModelView.render().el);\r
+    return this;\r
+  }\r
+});}).call(this);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.min.js
new file mode 100644 (file)
index 0000000..5736077
--- /dev/null
@@ -0,0 +1,9 @@
+(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}this.Handlebars=this.Handlebars||{},this.Handlebars.templates=this.Handlebars.templates||{},this.Handlebars.templates.apikey_auth=Handlebars.template({1:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <span class="key_auth__value">'+s((r=null!=(r=t.value||(null!=e?e.value:e))?r:o,typeof r===a?r.call(e,{name:"value",hash:{},data:i}):r))+"</span>\n"},3:function(e,t,n,i){return'                <input placeholder="api_key" class="auth_input input_apiKey_entry" name="apiKey" type="text"/>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div class="key_input_container">\n    <h3 class="auth__title">Api key authorization</h3>\n    <div class="auth__description">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a))+'</div>\n    <div>\n        <div class="key_auth__field">\n            <span class="key_auth__label">name:</span>\n            <span class="key_auth__value">'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+'</span>\n        </div>\n        <div class="key_auth__field">\n            <span class="key_auth__label">in:</span>\n            <span class="key_auth__value">'+l((a=null!=(a=t["in"]||(null!=e?e["in"]:e))?a:s,typeof a===o?a.call(e,{name:"in",hash:{},data:i}):a))+'</span>\n        </div>\n        <div class="key_auth__field">\n            <span class="key_auth__label">value:</span>\n';return r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(3,i),data:i}),null!=r&&(u+=r),u+"        </div>\n    </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.auth_button_operation=Handlebars.template({1:function(e,t,n,i){return"        authorize__btn_operation_login\n"},3:function(e,t,n,i){return"        authorize__btn_operation_logout\n"},5:function(e,t,n,i){var r,a='        <ul class="authorize-scopes">\n';return r=t.each.call(e,null!=e?e.scopes:e,{name:"each",hash:{},fn:this.program(6,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"        </ul>\n"},6:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <li class="authorize__scope" title="'+s((r=null!=(r=t.description||(null!=e?e.description:e))?r:o,typeof r===a?r.call(e,{name:"description",hash:{},data:i}):r))+'">'+s((r=null!=(r=t.scope||(null!=e?e.scope:e))?r:o,typeof r===a?r.call(e,{name:"scope",hash:{},data:i}):r))+"</li>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a='<div class="authorize__btn authorize__btn_operation\n';return r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(3,i),data:i}),null!=r&&(a+=r),a+='">\n',r=t["if"].call(e,null!=e?e.scopes:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"</div>\n"},useData:!0}),this.Handlebars.templates.auth_button=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){return"<a class='authorize__btn' href=\"#\">Authorize</a>\n"},useData:!0}),this.Handlebars.templates.auth_view=Handlebars.template({1:function(e,t,n,i){return'            <button type="button" class="auth__button auth_submit__button" data-sw-translate>Authorize</button>\n'},3:function(e,t,n,i){return'            <button type="button" class="auth__button auth_logout__button" data-sw-translate>Logout</button>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a='<div class="auth_container">\n\n    <div class="auth_inner"></div>\n    <div class="auth_submit">\n';return r=t.unless.call(e,null!=e?e.isLogout:e,{name:"unless",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(a+=r),r=t["if"].call(e,null!=e?e.isAuthorized:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"    </div>\n\n</div>\n"},useData:!0}),this.Handlebars.templates.basic_auth=Handlebars.template({1:function(e,t,n,i){return" - authorized"},3:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'                <span class="basic_auth__value">'+s((r=null!=(r=t.username||(null!=e?e.username:e))?r:o,typeof r===a?r.call(e,{name:"username",hash:{},data:i}):r))+"</span>\n"},5:function(e,t,n,i){return'                <input required placeholder="username" class="basic_auth__username auth_input" name="username" type="text"/>\n'},7:function(e,t,n,i){return'            <div class="auth_label">\n                <span class="basic_auth__label" data-sw-translate>password:</span>\n                <input required placeholder="password" class="basic_auth__password auth_input" name="password" type="password"/></label>\n            </div>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<div class='basic_auth_container'>\n    <h3 class=\"auth__title\">Basic authentication";return r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+='</h3>\n    <form class="basic_input_container">\n        <div class="auth__description">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a))+'</div>\n        <div class="auth_label">\n            <span class="basic_auth__label" data-sw-translate>username:</span>\n',r=t["if"].call(e,null!=e?e.isLogout:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.program(5,i),data:i}),null!=r&&(u+=r),u+="        </div>\n",r=t.unless.call(e,null!=e?e.isLogout:e,{name:"unless",hash:{},fn:this.program(7,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"    </form>\n</div>\n"},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return'   <option value="'+a(r(e,e))+'">'+a(r(e,e))+"</option>\n"},4:function(e,t,n,i){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<label data-sw-translate for="'+l((a=null!=(a=t.contentTypeId||(null!=e?e.contentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"contentTypeId",hash:{},data:i}):a))+'">Response Content Type</label>\n<select name="contentType" id="'+l((a=null!=(a=t.contentTypeId||(null!=e?e.contentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"contentTypeId",hash:{},data:i}):a))+'">\n';return r=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(4,i),data:i}),null!=r&&(u+=r),u+"</select>\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:if(e[0].length>0){var t="resource_"+e[0];Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1})}break;case 2:Docs.expandEndpointListForResource(e[0]),$("#"+t).slideto({highlight:!1});var n=e.join("_"),i=n+"_content";Docs.expandOperation($("#"+i)),$("#"+n).slideto({highlight:!1})}},toggleEndpointListForResource:function(e){var t=$("li#resource_"+Docs.escapeResourceName(e)+" ul.endpoints");t.is(":visible")?($.bbq.pushState("#/",2),Docs.collapseEndpointListForResource(e)):($.bbq.pushState("#/"+e,2),Docs.expandEndpointListForResource(e))},expandEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideDown();$("li#resource_"+e).addClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideDown()},collapseEndpointListForResource:function(e){var e=Docs.escapeResourceName(e);if(""==e)return void $(".resource ul.endpoints").slideUp();$("li#resource_"+e).removeClass("active");var t=$("li#resource_"+e+" ul.endpoints");t.slideUp()},expandOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideDown():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(e){return Docs.expandEndpointListForResource(e),""==e?void $(".resource ul.endpoints li.operation div.content").slideUp():void $("li#resource_"+Docs.escapeResourceName(e)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(e){return e.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(e){e.slideDown()},collapseOperation:function(e){e.slideUp()}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),Handlebars.registerHelper("renderTextParam",function(e){var t,n="text",i="",r=e.type||e.schema.type||"",a="array"===r.toLowerCase()||e.allowMultiple,o=a&&Array.isArray(e["default"])?e["default"].join("\n"):e["default"],s=Object.keys(e).filter(function(e){return null!==e.match(/^X-data-/i)}).reduce(function(t,n){return t+=" "+n.substring(2,n.length)+"='"+e[n]+"'"},"");if("undefined"==typeof o&&(o=""),e.format&&"password"===e.format&&(n="password"),e.valueId&&(i=" id='"+e.valueId+"'"),("string"==typeof o||o instanceof String)&&(o=o.replace(/'/g,"&apos;")),a)t="<textarea class='body-textarea"+(e.required?" required":"")+"' name='"+e.name+"'"+i+s,t+=" placeholder='Provide multiple values in new lines"+(e.required?" (at least one required).":".")+"'>",t+=o+"</textarea>";else{var l="parameter";e.required&&(l+=" required"),t="<input class='"+l+"' minlength='"+(e.required?1:0)+"'",t+=" name='"+e.name+"' placeholder='"+(e.required?"(required)":"")+"'"+i+s,t+=" type='"+n+"' value='"+o+"'/>"}return new Handlebars.SafeString(t)}),Handlebars.registerHelper("ifCond",function(e,t,n,i){switch(t){case"==":return e==n?i.fn(this):i.inverse(this);case"===":return e===n?i.fn(this):i.inverse(this);case"<":return n>e?i.fn(this):i.inverse(this);case"<=":return n>=e?i.fn(this):i.inverse(this);case">":return e>n?i.fn(this):i.inverse(this);case">=":return e>=n?i.fn(this):i.inverse(this);case"&&":return e&&n?i.fn(this):i.inverse(this);case"||":return e||n?i.fn(this):i.inverse(this);default:return i.inverse(this)}}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression,s='  <div class="info_title">'+o(a(null!=(r=null!=e?e.info:e)?r.title:r,e))+'</div>\n  <div class="info_description markdown">';return r=a(null!=(r=null!=e?e.info:e)?r.description:r,e),null!=r&&(s+=r),s+="</div>\n",r=t["if"].call(e,null!=e?e.externalDocs:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+="  ",r=t["if"].call(e,null!=(r=null!=e?e.info:e)?r.termsOfServiceUrl:r,{name:"if",hash:{},fn:this.program(4,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+="\n  ",r=t["if"].call(e,null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.name:r,{name:"if",hash:{},fn:this.program(6,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+="\n  ",r=t["if"].call(e,null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.url:r,{name:"if",hash:{},fn:this.program(8,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+="\n  ",r=t["if"].call(e,null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.email:r,{name:"if",hash:{},fn:this.program(10,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+="\n  ",r=t["if"].call(e,null!=(r=null!=e?e.info:e)?r.license:r,{name:"if",hash:{},fn:this.program(12,i),inverse:this.noop,data:i}),null!=r&&(s+=r),s+"\n"},2:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return"  <p>"+o(a(null!=(r=null!=e?e.externalDocs:e)?r.description:r,e))+'</p>\n  <a href="'+o(a(null!=(r=null!=e?e.externalDocs:e)?r.url:r,e))+'" target="_blank">'+o(a(null!=(r=null!=e?e.externalDocs:e)?r.url:r,e))+"</a>\n"},4:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return'<div class="info_tos"><a target="_blank" href="'+o(a(null!=(r=null!=e?e.info:e)?r.termsOfServiceUrl:r,e))+'" data-sw-translate>Terms of service</a></div>'},6:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return"<div class='info_name' data-sw-translate>Created by "+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.name:r,e))+"</div>"},8:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return"<div class='info_url' data-sw-translate>See more at <a href=\""+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.url:r,e))+'">'+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.url:r,e))+"</a></div>"},10:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return'<div class=\'info_email\'><a target="_parent" href="mailto:'+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.contact:r)?r.email:r,e))+"?subject="+o(a(null!=(r=null!=e?e.info:e)?r.title:r,e))+'" data-sw-translate>Contact the developer</a></div>'},12:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return"<div class='info_license'><a target=\"_blank\" href='"+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.license:r)?r.url:r,e))+"'>"+o(a(null!=(r=null!=(r=null!=e?e.info:e)?r.license:r)?r.name:r,e))+"</a></div>"},14:function(e,t,n,i){var r,a=this.lambda,o=this.escapeExpression;return'  , <span style="font-variant: small-caps" data-sw-translate>api version</span>: '+o(a(null!=(r=null!=e?e.info:e)?r.version:r,e))+"\n    "},16:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'    <span style="float:right"><a target="_blank" href="'+s((r=null!=(r=t.validatorUrl||(null!=e?e.validatorUrl:e))?r:o,typeof r===a?r.call(e,{name:"validatorUrl",hash:{},data:i}):r))+"/debug?url="+s((r=null!=(r=t.url||(null!=e?e.url:e))?r:o,typeof r===a?r.call(e,{name:"url",hash:{},data:i}):r))+'"><img id="validator" src="'+s((r=null!=(r=t.validatorUrl||(null!=e?e.validatorUrl:e))?r:o,typeof r===a?r.call(e,{name:"validatorUrl",hash:{},data:i}):r))+"?url="+s((r=null!=(r=t.url||(null!=e?e.url:e))?r:o,typeof r===a?r.call(e,{name:"url",hash:{},data:i}):r))+'"></a>\n    </span>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<div class='info' id='api_info'>\n";return r=t["if"].call(e,null!=e?e.info:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="</div>\n<div class='container' id='resources_container'>\n  <div class='authorize-wrapper'></div>\n\n  <ul id='resources'></ul>\n\n  <div class=\"footer\">\n    <h4 style=\"color: #999\">[ <span style=\"font-variant: small-caps\">base url</span>: "+l((a=null!=(a=t.basePath||(null!=e?e.basePath:e))?a:s,typeof a===o?a.call(e,{name:"basePath",hash:{},data:i}):a))+"\n",r=t["if"].call(e,null!=(r=null!=e?e.info:e)?r.version:r,{name:"if",hash:{},fn:this.program(14,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="]\n",r=t["if"].call(e,null!=e?e.validatorUrl:e,{name:"if",hash:{},fn:this.program(16,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"    </h4>\n    </div>\n</div>\n"},useData:!0}),this.Handlebars.templates.oauth2=Handlebars.template({1:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='            <li>\n                <input class="oauth-scope" type="checkbox" data-scope="'+l((a=null!=(a=t.scope||(null!=e?e.scope:e))?a:s,typeof a===o?a.call(e,{name:"scope",hash:{},data:i}):a))+'" oauthtype="'+l((a=null!=(a=t.OAuthSchemeKey||(null!=e?e.OAuthSchemeKey:e))?a:s,typeof a===o?a.call(e,{name:"OAuthSchemeKey",hash:{},data:i}):a))+'"/>\n                <label>'+l((a=null!=(a=t.scope||(null!=e?e.scope:e))?a:s,typeof a===o?a.call(e,{name:"scope",hash:{},data:i}):a))+'</label><br/>\n                <span class="api-scope-desc">'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a))+"\n";return r=t["if"].call(e,null!=e?e.OAuthSchemeKey:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"                </span>\n            </li>\n"},2:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                        ("+s((r=null!=(r=t.OAuthSchemeKey||(null!=e?e.OAuthSchemeKey:e))?r:o,typeof r===a?r.call(e,{name:"OAuthSchemeKey",hash:{},data:i}):r))+")\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<div>\n    <h3 class="auth__title">Select OAuth2.0 Scopes</h3>\n    <p>'+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a))+'</p>\n    <p>Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes.\n        <a href="#">Learn how to use</a>\n    </p>\n    <p><strong> '+l((a=null!=(a=t.appName||(null!=e?e.appName:e))?a:s,typeof a===o?a.call(e,{name:"appName",hash:{},data:i}):a))+" </strong> API requires the following scopes. Select which ones you want to grant to Swagger UI.</p>\n    <p>Authorization URL: "+l((a=null!=(a=t.authorizationUrl||(null!=e?e.authorizationUrl:e))?a:s,typeof a===o?a.call(e,{name:"authorizationUrl",hash:{},data:i}):a))+"</p>\n    <p>flow: "+l((a=null!=(a=t.flow||(null!=e?e.flow:e))?a:s,typeof a===o?a.call(e,{name:"flow",hash:{},data:i}):a))+'</p>\n    <ul class="api-popup-scopes">\n';return r=t.each.call(e,null!=e?e.scopes:e,{name:"each",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"    </ul>\n</div>"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,i){return"deprecated"},3:function(e,t,n,i){return"            <h4><span data-sw-translate>Warning: Deprecated</span></h4>\n"},5:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l='        <h4><span data-sw-translate>Implementation Notes</span></h4>\n        <div class="markdown">';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(l+=r),l+"</div>\n"},7:function(e,t,n,i){return"            <div class='authorize-wrapper authorize-wrapper_operation'></div>\n"},9:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='          <div class="response-class">\n            <h4><span data-sw-translate>Response Class</span> (<span data-sw-translate>Status</span> '+l((a=null!=(a=t.successCode||(null!=e?e.successCode:e))?a:s,typeof a===o?a.call(e,{name:"successCode",hash:{},data:i}):a))+")</h4>\n              ";return r=t["if"].call(e,null!=e?e.successDescription:e,{name:"if",hash:{},fn:this.program(10,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+'\n            <p><span class="model-signature" /></p>\n            <br/>\n            <div class="response-content-type" />\n            </div>\n'},10:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l='<div class="markdown">';return a=null!=(a=t.successDescription||(null!=e?e.successDescription:e))?a:s,r=typeof a===o?a.call(e,{name:"successDescription",hash:{},data:i}):a,null!=r&&(l+=r),l+"</div>"},12:function(e,t,n,i){var r,a='          <h4 data-sw-translate>Headers</h4>\n          <table class="headers">\n            <thead>\n              <tr>\n                <th style="width: 100px; max-width: 100px" data-sw-translate>Header</th>\n                <th style="width: 310px; max-width: 310px" data-sw-translate>Description</th>\n                <th style="width: 200px; max-width: 200px" data-sw-translate>Type</th>\n                <th style="width: 320px; max-width: 320px" data-sw-translate>Other</th>\n              </tr>\n            </thead>\n            <tbody>\n';return r=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(13,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+"            </tbody>\n          </table>\n"},13:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return"              <tr>\n                <td>"+a(r(i&&i.key,e))+"</td>\n                <td>"+a(r(null!=e?e.description:e,e))+"</td>\n                <td>"+a(r(null!=e?e.type:e,e))+"</td>\n                <td>"+a(r(null!=e?e.other:e,e))+"</td>\n              </tr>\n"},15:function(e,t,n,i){return'          <h4 data-sw-translate>Parameters</h4>\n          <table class=\'fullwidth\'>\n          <thead>\n            <tr>\n            <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter</th>\n            <th style="width: 310px; max-width: 310px" data-sw-translate>Value</th>\n            <th style="width: 200px; max-width: 200px" data-sw-translate>Description</th>\n            <th style="width: 100px; max-width: 100px" data-sw-translate>Parameter Type</th>\n            <th style="width: 220px; max-width: 230px" data-sw-translate>Data Type</th>\n            </tr>\n          </thead>\n          <tbody class="operation-params">\n\n          </tbody>\n          </table>\n'},17:function(e,t,n,i){return"          <div style='margin:0;padding:0;display:inline'></div>\n          <h4 data-sw-translate>Response Messages</h4>\n          <table class='fullwidth'>\n            <thead>\n            <tr>\n              <th data-sw-translate>HTTP Status Code</th>\n              <th data-sw-translate>Reason</th>\n              <th data-sw-translate>Response Model</th>\n              <th data-sw-translate>Headers</th>\n            </tr>\n            </thead>\n            <tbody class=\"operation-status\">\n            </tbody>\n          </table>\n"},19:function(e,t,n,i){return""},21:function(e,t,n,i){return"          <div class='sandbox_header'>\n            <input class='submit' type='submit' value='Try it out!' data-sw-translate/>\n            <a href='#' class='response_hider' style='display:none' data-sw-translate>Hide Response</a>\n            <span class='response_throbber' style='display:none'></span>\n          </div>\n"},23:function(e,t,n,i){return"          <h4 data-sw-translate>Request Headers</h4>\n          <div class='block request_headers'></div>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="  <ul class='operations' >\n    <li class='"+l((a=null!=(a=t.method||(null!=e?e.method:e))?a:s,typeof a===o?a.call(e,{name:"method",hash:{},data:i}):a))+" operation' id='"+l((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:s,typeof a===o?a.call(e,{name:"parentId",hash:{},data:i}):a))+"_"+l((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:s,typeof a===o?a.call(e,{name:"nickname",hash:{},data:i}):a))+"'>\n      <div class='heading'>\n        <h3>\n          <span class='http_method'>\n          <a href='#!/"+l((a=null!=(a=t.encodedParentId||(null!=e?e.encodedParentId:e))?a:s,typeof a===o?a.call(e,{name:"encodedParentId",hash:{},data:i}):a))+"/"+l((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:s,typeof a===o?a.call(e,{name:"nickname",hash:{},data:i}):a))+'\' class="toggleOperation">'+l((a=null!=(a=t.method||(null!=e?e.method:e))?a:s,typeof a===o?a.call(e,{name:"method",hash:{},data:i}):a))+"</a>\n          </span>\n          <span class='path'>\n          <a href='#!/"+l((a=null!=(a=t.encodedParentId||(null!=e?e.encodedParentId:e))?a:s,typeof a===o?a.call(e,{name:"encodedParentId",hash:{},data:i}):a))+"/"+l((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:s,typeof a===o?a.call(e,{name:"nickname",hash:{},data:i}):a))+"' class=\"toggleOperation ";return r=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+='">'+l((a=null!=(a=t.path||(null!=e?e.path:e))?a:s,typeof a===o?a.call(e,{name:"path",hash:{},data:i}):a))+"</a>\n          </span>\n        </h3>\n        <ul class='options'>\n          <li>\n          <a href='#!/"+l((a=null!=(a=t.encodedParentId||(null!=e?e.encodedParentId:e))?a:s,typeof a===o?a.call(e,{name:"encodedParentId",hash:{},data:i}):a))+"/"+l((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:s,typeof a===o?a.call(e,{name:"nickname",hash:{},data:i}):a))+'\' class="toggleOperation">',a=null!=(a=t.summary||(null!=e?e.summary:e))?a:s,r=typeof a===o?a.call(e,{name:"summary",hash:{},data:i}):a,null!=r&&(u+=r),u+="</a>\n          </li>\n        </ul>\n      </div>\n      <div class='content' id='"+l((a=null!=(a=t.parentId||(null!=e?e.parentId:e))?a:s,typeof a===o?a.call(e,{name:"parentId",hash:{},data:i}):a))+"_"+l((a=null!=(a=t.nickname||(null!=e?e.nickname:e))?a:s,typeof a===o?a.call(e,{name:"nickname",hash:{},data:i}):a))+"_content' style='display:none'>\n",r=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.noop,data:i}),null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.security:e,{name:"if",hash:{},fn:this.program(7,i),inverse:this.noop,data:i}),null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="\n",r=t["if"].call(e,null!=e?e.headers:e,{name:"if",hash:{},fn:this.program(12,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="\n        <form accept-charset='UTF-8' class='sandbox'>\n          <div style='margin:0;padding:0;display:inline'></div>\n",r=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(15,i),inverse:this.noop,data:i}),null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(17,i),inverse:this.noop,data:i}),null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.isReadOnly:e,{name:"if",hash:{},fn:this.program(19,i),inverse:this.program(21,i),data:i}),null!=r&&(u+=r),u+="        </form>\n        <div class='response' style='display:none'>\n          <h4 class='curl'>Curl</h4>\n          <div class='block curl'></div>\n          <h4 data-sw-translate>Request URL</h4>\n          <div class='block request_url'></div>\n",r=t["if"].call(e,null!=e?e.showRequestHeaders:e,{name:"if",hash:{},fn:this.program(23,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"          <h4 data-sw-translate>Response Body</h4>\n          <div class='block response_body'></div>\n          <h4 data-sw-translate>Response Code</h4>\n          <div class='block response_code'></div>\n          <h4 data-sw-translate>Response Headers</h4>\n          <div class='block response_headers'></div>\n        </div>\n      </div>\n    </li>\n  </ul>\n"},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,i){return" required"},3:function(e,t,n,i){return' multiple="multiple"'},5:function(e,t,n,i){return" required "},7:function(e,t,n,i){var r,a="      <option ";return r=t.unless.call(e,null!=e?e.hasDefault:e,{name:"unless",hash:{},fn:this.program(8,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a+" value=''></option>\n"},8:function(e,t,n,i){return'  selected="" '},10:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="\n      <option ";return r=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(11,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="  value='"+l((a=null!=(a=t.value||(null!=e?e.value:e))?a:s,typeof a===o?a.call(e,{name:"value",hash:{},data:i}):a))+"'> "+l((a=null!=(a=t.value||(null!=e?e.value:e))?a:s,typeof a===o?a.call(e,{name:"value",hash:{},data:i}):a))+" ",r=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(13,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+" </option>\n\n"},11:function(e,t,n,i){return' selected=""  '},13:function(e,t,n,i){return" (default) "},15:function(e,t,n,i){return"<strong>"},17:function(e,t,n,i){return"</strong>"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td class='code";return r=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="'><label for='"+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+"'>"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+"</label></td>\n<td>\n  <select ",r=(t.isArray||e&&e.isArray||s).call(e,e,{name:"isArray",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+=' class="parameter ',r=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+='" name="'+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+'" id="'+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+'">\n\n',r=t.unless.call(e,null!=e?e.required:e,{name:"unless",hash:{},fn:this.program(7,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="\n",r=t.each.call(e,null!=(r=null!=e?e.allowableValues:e)?r.descriptiveValues:r,{name:"each",hash:{},fn:this.program(10,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+='\n  </select>\n</td>\n<td class="markdown">',r=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(15,i),inverse:this.noop,data:i}),null!=r&&(u+=r),a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(u+=r),r=t["if"].call(e,null!=e?e.required:e,{name:"if",hash:{},fn:this.program(17,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+="</td>\n<td>",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,r=typeof a===o?a.call(e,{name:"paramType",hash:{},data:i}):a,null!=r&&(u+=r),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"        <textarea class='body-textarea' readonly='readonly' placeholder='(required)' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+"'>"+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",hash:{},data:i}):r))+"</textarea>\n"},3:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,i),inverse:this.program(6,i),data:i}),null!=r&&(a+=r),a},4:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"            "+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",\r
+hash:{},data:i}):r))+"\n"},6:function(e,t,n,i){return"            (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td class='code required'><label for='"+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+"'>"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+"</label></td>\n<td>\n";return r=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(3,i),data:i}),null!=r&&(u+=r),u+='</td>\n<td class="markdown">',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(u+=r),u+="</td>\n<td>",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,r=typeof a===o?a.call(e,{name:"paramType",hash:{},data:i}):a,null!=r&&(u+=r),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"        <textarea class='body-textarea' readonly='readonly' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+"'>"+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",hash:{},data:i}):r))+'</textarea>\n        <div class="parameter-content-type" />\n'},3:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,i),inverse:this.program(6,i),data:i}),null!=r&&(a+=r),a},4:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"            "+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",hash:{},data:i}):r))+"\n"},6:function(e,t,n,i){return"            (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td class='code'><label for='"+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+"'>"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+"</label></td>\n<td>\n";return r=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(3,i),data:i}),null!=r&&(u+=r),u+='</td>\n<td class="markdown">',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(u+=r),u+="</td>\n<td>",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,r=typeof a===o?a.call(e,{name:"paramType",hash:{},data:i}):a,null!=r&&(u+=r),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.program(4,i),data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'                   <input type="file" name=\''+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+"'/>\n"},4:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.program(7,i),data:i}),null!=r&&(a+=r),a},5:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                         <div class=\"editor_holder\"></div>\n                           <textarea class='body-textarea required' placeholder='(required)' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id=\""+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+'">'+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",hash:{},data:i}):r))+'</textarea>\n        <br />\n        <div class="parameter-content-type" />\n'},7:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                            <textarea class='body-textarea required' placeholder='(required)' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+'\'></textarea>\n                               <div class="editor_holder"></div>\n                             <br />\n                                <div class="parameter-content-type" />\n'},9:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,i),inverse:this.program(12,i),data:i}),null!=r&&(a+=r),a},10:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                  <input class='parameter' class='required' type='file' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+"'/>\n"},12:function(e,t,n,i){var r,a=t.helperMissing,o="";return r=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(13,i),inverse:this.noop,data:i}),null!=r&&(o+=r),o},13:function(e,t,n,i){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td class='code required'><label for='"+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+"'>"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+"</label></td>\n<td>\n";return r=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(9,i),data:i}),null!=r&&(u+=r),u+='</td>\n<td>\n      <strong><span class="markdown">',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(u+=r),u+="</span></strong>\n</td>\n<td>",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,r=typeof a===o?a.call(e,{name:"paramType",hash:{},data:i}):a,null!=r&&(u+=r),u+'</td>\n<td><span class="model-signature"></span></td>\n'},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.program(4,i),data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'                   <input type="file" name=\''+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+'\'/>\n                       <div class="parameter-content-type" />\n'},4:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.program(7,i),data:i}),null!=r&&(a+=r),a},5:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                         <div class=\"editor_holder\"></div>\n                           <textarea class='body-textarea' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+"'>"+s((r=null!=(r=t["default"]||(null!=e?e["default"]:e))?r:o,typeof r===a?r.call(e,{name:"default",hash:{},data:i}):r))+'</textarea>\n        <br />\n        <div class="parameter-content-type" />\n'},7:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"                               <textarea class='body-textarea' name='"+s((r=null!=(r=t.name||(null!=e?e.name:e))?r:o,typeof r===a?r.call(e,{name:"name",hash:{},data:i}):r))+"' id='"+s((r=null!=(r=t.valueId||(null!=e?e.valueId:e))?r:o,typeof r===a?r.call(e,{name:"valueId",hash:{},data:i}):r))+'\'></textarea>\n                         <div class="editor_holder"></div>\n                             <br />\n                                <div class="parameter-content-type" />\n'},9:function(e,t,n,i){var r,a="";return r=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.program(10,i),data:i}),null!=r&&(a+=r),a},10:function(e,t,n,i){var r,a=t.helperMissing,o="";return r=(t.renderTextParam||e&&e.renderTextParam||a).call(e,e,{name:"renderTextParam",hash:{},fn:this.program(11,i),inverse:this.noop,data:i}),null!=r&&(o+=r),o},11:function(e,t,n,i){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td class='code'><label for='"+l((a=null!=(a=t.valueId||(null!=e?e.valueId:e))?a:s,typeof a===o?a.call(e,{name:"valueId",hash:{},data:i}):a))+"'>"+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:i}):a))+"</label></td>\n<td>\n\n";return r=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(9,i),data:i}),null!=r&&(u+=r),u+='\n</td>\n<td class="markdown">',a=null!=(a=t.description||(null!=e?e.description:e))?a:s,r=typeof a===o?a.call(e,{name:"description",hash:{},data:i}):a,null!=r&&(u+=r),u+="</td>\n<td>",a=null!=(a=t.paramType||(null!=e?e.paramType:e))?a:s,r=typeof a===o?a.call(e,{name:"paramType",hash:{},data:i}):a,null!=r&&(u+=r),u+'</td>\n<td>\n        <span class="model-signature"></span>\n</td>\n'},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return'  <option value="'+a(r(e,e))+'">'+a(r(e,e))+"</option>\n"},4:function(e,t,n,i){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<label for="'+l((a=null!=(a=t.parameterContentTypeId||(null!=e?e.parameterContentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"parameterContentTypeId",hash:{},data:i}):a))+'" data-sw-translate>Parameter content type:</label>\n<select name="parameterContentType" id="'+l((a=null!=(a=t.parameterContentTypeId||(null!=e?e.parameterContentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"parameterContentTypeId",hash:{},data:i}):a))+'">\n';return r=t["if"].call(e,null!=e?e.consumes:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(4,i),data:i}),null!=r&&(u+=r),u+"</select>\n"},useData:!0}),this.Handlebars.templates.popup=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return'<div class="api-popup-dialog-wrapper">\n    <div class="api-popup-title">'+s((r=null!=(r=t.title||(null!=e?e.title:e))?r:o,typeof r===a?r.call(e,{name:"title",hash:{},data:i}):r))+'</div>\n    <div class="api-popup-content"></div>\n    <p class="error-msg"></p>\n    <div class="api-popup-actions">\n        <button class="api-popup-cancel api-button gray" type="button">Cancel</button>\n    </div>\n</div>\n<div class="api-popup-dialog-shadow"></div>'},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({1:function(e,t,n,i){return" : "},3:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"    <li>\n      <a href='"+s((r=null!=(r=t.url||(null!=e?e.url:e))?r:o,typeof r===a?r.call(e,{name:"url",hash:{},data:i}):r))+"' data-sw-translate>Raw</a>\n    </li>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="<div class='heading'>\n  <h2>\n    <a href='#!/"+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'\' class="toggleEndpointList" data-id="'+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'">'+u((a=null!=(a=t.name||(null!=e?e.name:e))?a:l,typeof a===s?a.call(e,{name:"name",hash:{},data:i}):a))+"</a> ";return a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,o={name:"summary",hash:{},fn:this.program(1,i),inverse:this.noop,data:i},r=typeof a===s?a.call(e,o):a,t.summary||(r=c.call(e,r,o)),null!=r&&(p+=r),a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,r=typeof a===s?a.call(e,{name:"summary",hash:{},data:i}):a,null!=r&&(p+=r),p+="\n  </h2>\n  <ul class='options'>\n    <li>\n      <a href='#!/"+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+"' id='endpointListTogger_"+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'\' class="toggleEndpointList" data-id="'+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'" data-sw-translate>Show/Hide</a>\n    </li>\n    <li>\n      <a href=\'#\' class="collapseResource" data-id="'+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'" data-sw-translate>\n        List Operations\n      </a>\n    </li>\n    <li>\n      <a href=\'#\' class="expandResource" data-id="'+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+'" data-sw-translate>\n        Expand Operations\n      </a>\n    </li>\n',r=t["if"].call(e,null!=e?e.url:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(p+=r),p+"  </ul>\n</div>\n<ul class='endpoints' id='"+u((a=null!=(a=t.id||(null!=e?e.id:e))?a:l,typeof a===s?a.call(e,{name:"id",hash:{},data:i}):a))+"_endpoint_list' style='display:none'>\n\n</ul>\n"},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,i){var r,a="";return r=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(a+=r),a},2:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return'  <option value="'+a(r(e,e))+'">'+a(r(e,e))+"</option>\n"},4:function(e,t,n,i){return'  <option value="application/json">application/json</option>\n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='<label data-sw-translate for="'+l((a=null!=(a=t.responseContentTypeId||(null!=e?e.responseContentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"responseContentTypeId",hash:{},data:i}):a))+'">Response Content Type</label>\n<select name="responseContentType" id="'+l((a=null!=(a=t.responseContentTypeId||(null!=e?e.responseContentTypeId:e))?a:s,typeof a===o?a.call(e,{name:"responseContentTypeId",hash:{},data:i}):a))+'">\n';return r=t["if"].call(e,null!=e?e.produces:e,{name:"if",hash:{},fn:this.program(1,i),inverse:this.program(4,i),data:i}),null!=r&&(u+=r),u+"</select>\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({1:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l='\n<div>\n<ul class="signature-nav">\n  <li><a class="description-link" href="#" data-sw-translate>Model</a></li>\n  <li><a class="snippet-link" href="#" data-sw-translate>Example Value</a></li>\n</ul>\n<div>\n\n<div class="signature-container">\n  <div class="description">\n    ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,r=typeof a===o?a.call(e,{name:"signature",hash:{},data:i}):a,null!=r&&(l+=r),l+='\n  </div>\n\n  <div class="snippet">\n',r=t["if"].call(e,null!=e?e.sampleJSON:e,{name:"if",hash:{},fn:this.program(2,i),inverse:this.noop,data:i}),null!=r&&(l+=r),r=t["if"].call(e,null!=e?e.sampleXML:e,{name:"if",hash:{},fn:this.program(5,i),inverse:this.noop,data:i}),null!=r&&(l+=r),l+"  </div>\n</div>\n"},2:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='      <div class="snippet_json">\n        <pre><code>'+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:i}):a))+"</code></pre>\n        ";return r=t["if"].call(e,null!=e?e.isParam:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"\n      </div>\n"},3:function(e,t,n,i){return'<small class="notice" data-sw-translate></small>'},5:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='    <div class="snippet_xml">\n      <pre><code>'+l((a=null!=(a=t.sampleXML||(null!=e?e.sampleXML:e))?a:s,typeof a===o?a.call(e,{name:"sampleXML",hash:{},data:i}):a))+"</code></pre>\n      ";return r=t["if"].call(e,null!=e?e.isParam:e,{name:"if",hash:{},fn:this.program(3,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"\n    </div>\n"},7:function(e,t,n,i){var r,a="function",o=t.helperMissing,s=this.escapeExpression;return"    "+s((r=null!=(r=t.signature||(null!=e?e.signature:e))?r:o,typeof r===a?r.call(e,{name:"signature",hash:{},data:i}):r))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a=t.helperMissing;return r=(t.ifCond||e&&e.ifCond||a).call(e,null!=e?e.sampleJSON:e,"||",null!=e?e.sampleXML:e,{name:"ifCond",hash:{},fn:this.program(1,i),inverse:this.program(7,i),data:i}),null!=r?r:""},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({1:function(e,t,n,i){var r=this.lambda,a=this.escapeExpression;return"      <tr>\n        <td>"+a(r(i&&i.key,e))+"</td>\n        <td>"+a(r(null!=e?e.description:e,e))+"</td>\n        <td>"+a(r(null!=e?e.type:e,e))+"</td>\n      </tr>\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,i){var r,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="<td width='15%' class='code'>"+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:i}):a))+'</td>\n<td class="markdown">';return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,r=typeof a===o?a.call(e,{name:"message",hash:{},data:i}):a,null!=r&&(u+=r),u+='</td>\n<td width=\'50%\'><span class="model-signature" /></td>\n<td class="headers">\n  <table>\n    <tbody>\n',r=t.each.call(e,null!=e?e.headers:e,{name:"each",hash:{},fn:this.program(1,i),inverse:this.noop,data:i}),null!=r&&(u+=r),u+"    </tbody>\n  </table>\n</td>"},useData:!0}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var t;return function n(e,t,i){function r(o,s){if(!t[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return r(n?n:t)},c,c.exports,n,e,t,i)}return t[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e,t,n){"use strict";var i=e("./lib/auth"),r=e("./lib/helpers"),a=e("./lib/client"),o=function(e,t){return r.log('This is deprecated, use "new SwaggerClient" instead.'),new a(e,t)};Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){for(var n=t||0,i=this.length;i>n;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=i.ApiKeyAuthorization,a.PasswordAuthorization=i.PasswordAuthorization,a.CookieAuthorization=i.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o,a.SchemaMarkup=e("./lib/schema-markup")},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4,"./lib/schema-markup":7}],2:[function(e,t,n){"use strict";var i=e("./helpers"),r=e("btoa"),a=e("cookiejar").CookieJar,o={each:e("lodash-compat/collection/each"),includes:e("lodash-compat/collection/includes"),isObject:e("lodash-compat/lang/isObject"),isArray:e("lodash-compat/lang/isArray")},s=t.exports.SwaggerAuthorizations=function(e){this.authz=e||{}};s.prototype.add=function(e,t){if(o.isObject(e))for(var n in e)this.authz[n]=e[n];else"string"==typeof e&&(this.authz[e]=t);return t},s.prototype.remove=function(e){return delete this.authz[e]},s.prototype.apply=function(e,t){var n=!0,i=!t,r=[],a=e.clientAuthorizations||this.authz;return o.each(t,function(e,t){"string"==typeof t&&r.push(t),o.each(e,function(e,t){r.push(t)})}),o.each(a,function(t,a){if(i||o.includes(r,a)){var s=t.apply(e);n=n&&!!s}}),n};var l=t.exports.ApiKeyAuthorization=function(e,t,n){this.name=e,this.value=t,this.type=n};l.prototype.apply=function(e){if("query"===this.type){var t;if(e.url.indexOf("?")>0){t=e.url.substring(e.url.indexOf("?")+1);var n=t.split("&");if(n&&n.length>0)for(var i=0;i<n.length;i++){var r=n[i].split("=");if(r&&r.length>0&&r[0]===this.name)return!1}}return e.url.indexOf("?")>0?e.url=e.url+"&"+this.name+"="+this.value:e.url=e.url+"?"+this.name+"="+this.value,!0}return"header"===this.type?("undefined"==typeof e.headers[this.name]&&(e.headers[this.name]=this.value),!0):void 0};var u=t.exports.CookieAuthorization=function(e){this.cookie=e};u.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new a,e.cookieJar.setCookie(this.cookie),!0};var c=t.exports.PasswordAuthorization=function(e,t){3===arguments.length&&(i.log("PasswordAuthorization: the 'name' argument has been removed, pass only username and password"),e=arguments[1],t=arguments[2]),this.username=e,this.password=t};c.prototype.apply=function(e){return"undefined"==typeof e.headers.Authorization&&(e.headers.Authorization="Basic "+r(this.username+":"+this.password)),!0}},{"./helpers":4,btoa:14,cookiejar:20,"lodash-compat/collection/each":54,"lodash-compat/collection/includes":57,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isObject":146}],3:[function(e,t,n){"use strict";var i={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isObject:e("lodash-compat/lang/isObject"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},r=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),h=e("q"),f=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","enableCookies","fail","failure","finish","help","host","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","title","url","useJQuery"],d=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],m=["delete","get","head","options","patch","post","put"],g=t.exports=function(e,t){return this.authorizations=null,this.authorizationScheme=null,this.basePath=null,this.debug=!1,this.enableCookies=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,this.swaggerObject={},this.deferredClient=void 0,this.clientAuthorizations=new r.SwaggerAuthorizations,"undefined"!=typeof e?this.initialize(e,t):this};g.prototype.initialize=function(e,t){return this.models={},this.sampleModels={},"string"==typeof e?this.url=e:i.isObject(e)&&(t=e,this.url=t.url),t=t||{},this.clientAuthorizations.add(t.authorizations),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.parameterMacro||null,this.usePromise=t.usePromise||null,this.usePromise&&(this.deferredClient=h.defer()),"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),t.enableCookies&&(this.enableCookies=t.enableCookies),this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(e){throw e},this.progress=t.progress||function(){},this.spec=i.cloneDeep(t.spec),t.scheme&&(this.scheme=t.scheme),this.usePromise||"function"==typeof t.success?(this.ready=!0,this.build()):void 0},g.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url+"; Please wait.");var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return"http"!==t.url.substring(0,4)?t.fail("Please specify the protocol for "+t.url):0===e.status?t.fail("Can't read from server.  It may not have the appropriate access-control-origin settings."):404===e.status?t.fail("Can't read swagger JSON from "+t.url):t.fail(e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj;if(!n)return t.fail("failed to parse JSON/YAML response");if(t.swaggerVersion=n.swaggerVersion,t.swaggerObject=n,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.url,t.buildFromSpec,t),t.isValid=!0;else{var i=new p;t.oldSwaggerObject=t.swaggerObject,i.setDocumentationLocation(t.url),i.convert(n,t.clientAuthorizations,t.options,function(e){t.swaggerObject=e,(new u).resolve(e,t.url,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)t.swaggerObject=this.spec,setTimeout(function(){(new u).resolve(t.spec,t.url,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this.usePromise?this.deferredClient.promise:this},g.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.security=e.security,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t<e.tags.length;t++){var r=e.tags[t];n[r.name]=r}var u;"string"==typeof this.url?(u=this.parseUri(this.url),"undefined"==typeof this.scheme&&"undefined"==typeof this.schemes||0===this.schemes.length?this.scheme=u.scheme||"http":"undefined"==typeof this.scheme&&(this.scheme=this.schemes[0]||u.scheme),"undefined"!=typeof this.host&&""!==this.host||(this.host=u.host,u.port&&(this.host=this.host+":"+u.port))):"undefined"==typeof this.schemes||0===this.schemes.length?this.scheme="http":"undefined"==typeof this.scheme&&(this.scheme=this.schemes[0]),this.definitions=e.definitions;var c;for(c in this.definitions){var p=new o(c,this.definitions[c],this.models,this.modelPropertyMacro);p&&(this.models[c]=p)}var h=this;h.apis.help=i.bind(h.help,h),i.forEach(e.paths,function(e,t){i.isPlainObject(e)&&i.forEach(m,function(r){var o=e[r];if(!i.isUndefined(o)){if(!i.isPlainObject(o))return void a.log("The '"+r+"' operation for '"+t+"' path is not an Operation Object");var u=o.tags;!i.isUndefined(u)&&i.isArray(u)&&0!==u.length||(u=o.tags=["default"]);var c=h.idFromOp(t,r,o),p=new s(h,o.scheme,c,r,t,o,h.definitions,h.models,h.clientAuthorizations);i.forEach(u,function(e){var t=i.indexOf(f,e)>-1?"_"+e:e,r=i.indexOf(d,e)>-1?"_"+e:e,o=h[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name.  Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),r!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name.  Use 'client.apis."+r+"' instead of 'client.apis."+e+"'."),i.indexOf(d,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name.  Use 'client.apis."+r+"._"+c+"' instead of 'client.apis."+r+"."+c+"'."),c="_"+c,p.nickname=c),i.isUndefined(o)){o=h[t]=h.apis[r]={},o.operations={},o.label=r,o.apis={};var s=n[e];i.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),h[t].help=i.bind(h.help,o),h.apisArray.push(new l(e,o.description,o.externalDocs,p))}c=h.makeUniqueOperationId(c,h.apis[r]),i.isFunction(o.help)||(o.help=i.bind(h.help,o)),h.apis[r][c]=o[c]=i.bind(p.execute,p),h.apis[r][c].help=o[c].help=i.bind(p.help,p),h.apis[r][c].asCurl=o[c].asCurl=i.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=i.find(h.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})});var g=[];return i.forEach(Object.keys(n),function(e){var t;for(t in h.apisArray){var n=h.apisArray[t];n&&e===n.name&&(g.push(n),h.apisArray[t]=null)}}),i.forEach(h.apisArray,function(e){e&&g.push(e)}),h.apisArray=g,i.forEach(e.definitions,function(e,t){e.id=t.toLowerCase(),e.name=t,h.modelsArray.push(e)}),this.isBuilt=!0,this.usePromise?(this.isValid=!0,this.isBuilt=!0,this.deferredClient.resolve(this),this.deferredClient.promise):(this.success&&this.success(),this)},g.prototype.makeUniqueOperationId=function(e,t){for(var n=0,r=e;;){var a=!1;if(i.forEach(t.operations,function(e){e.nickname===r&&(a=!0)}),!a)return r;r=e+"_"+n,n++}return e},g.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4]?n[4].replace(":",""):void 0,host:n[11],port:n[12],path:n[15]}},g.prototype.help=function(e){var t="";return this instanceof g?i.forEach(this.apis,function(e,n){i.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",i.forEach(e.operations,function(e,n){t+="  * "+n+": "+e.summary+"\n"}))}):(this instanceof l||i.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",i.forEach(this.apis,function(e,n){t+="  * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},g.prototype.tagFromLabel=function(e){return e},g.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var i=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return i=i.replace(/((_){2,})/g,"_"),i=i.replace(/^(_)*/g,""),i=i.replace(/([_])*$/g,"")},g.prototype.setHost=function(e){this.host=e,this.apis&&i.forEach(this.apis,function(t){t.operations&&i.forEach(t.operations,function(t){t.host=e})})},g.prototype.setBasePath=function(e){this.basePath=e,this.apis&&i.forEach(this.apis,function(t){t.operations&&i.forEach(t.operations,function(t){t.basePath=e})})},g.prototype.setSchemes=function(e){this.schemes=e,e&&e.length>0&&this.apis&&i.forEach(this.apis,function(t){t.operations&&i.forEach(t.operations,function(t){t.scheme=e[0]})})},g.prototype.fail=function(e){return this.usePromise?(this.deferredClient.reject(e),this.deferredClient.promise):void(this.failure?this.failure(e):this.failure(e))}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":51,"lodash-compat/collection/find":55,"lodash-compat/collection/forEach":56,"lodash-compat/function/bind":60,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isFunction":144,\r
+"lodash-compat/lang/isObject":146,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isUndefined":150,q:159}],4:[function(e,t,n){(function(n){"use strict";var i={isPlainObject:e("lodash-compat/lang/isPlainObject"),indexOf:e("lodash-compat/array/indexOf")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var r=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){r(e)};var a=(t.exports.optionHtml=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"},t.exports.resolveSchema=function(e){return i.isPlainObject(e.schema)&&(e=a(e.schema)),e});t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e}}).call(this,e("_process"))},{_process:13,"lodash-compat/array/indexOf":51,"lodash-compat/lang/isPlainObject":147}],5:[function(t,n,i){"use strict";var r=t("./helpers"),a=t("superagent"),o=t("js-yaml"),s={isObject:t("lodash-compat/lang/isObject")},l=function(){this.type="JQueryHttpClient"},u=function(){this.type="SuperagentHttpClient"},c=n.exports=function(){};c.prototype.execute=function(t,n){var i;i=n&&n.client?n.client:new u(n),i.opts=n||{};var r=!1;if("undefined"!=typeof window&&"undefined"!=typeof window.jQuery&&(r=!0),"options"===t.method.toLowerCase()&&"SuperagentHttpClient"===i.type&&(e("forcing jQuery as OPTIONS are not supported by SuperAgent"),t.useJQuery=!0),this.isInternetExplorer()&&(t.useJQuery===!1||!r))throw new Error("Unsupported configuration! JQuery is required but not available");(t&&t.useJQuery===!0||this.isInternetExplorer()&&r)&&(i=new l(n));var a=t.on.response,o=function(e){return n&&n.requestInterceptor&&(e=n.requestInterceptor.apply(e)),e},c=function(e){return n&&n.responseInterceptor&&(e=n.responseInterceptor.apply(e)),a(e)};return t.on.response=function(e){c(e)},s.isObject(t)&&s.isObject(t.body)&&(t.body.type&&"formData"===t.body.type?(t.contentType=!1,t.processData=!1,delete t.headers["Content-Type"]):t.body=JSON.stringify(t.body)),t=o(t)||t,t.beforeSend?t.beforeSend(function(e){i.execute(e||t)}):i.execute(t),t.deferred?t.deferred.promise:t},c.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},l.prototype.execute=function(e){var t=this.jQuery||"undefined"!=typeof window&&window.jQuery,n=e.on,i=e;if("undefined"==typeof t||t===!1)throw new Error("Unsupported configuration! JQuery is required but not available");return e.type=e.method,e.cache=!1,e.data=e.body,delete e.useJQuery,delete e.body,e.complete=function(e){for(var t={},a=e.getAllResponseHeaders().split("\n"),s=0;s<a.length;s++){var l=a[s].trim();if(0!==l.length){var u=l.indexOf(":");if(-1!==u){var c=l.substring(0,u).trim(),p=l.substring(u+1).trim();t[c]=p}else t[l]=null}}var h={url:i.url,method:i.method,status:e.status,statusText:e.statusText,data:e.responseText,headers:t};try{var f=e.responseJSON||o.safeLoad(e.responseText);h.obj="string"==typeof f?{}:f}catch(d){r.log("unable to parse JSON/YAML content")}if(h.obj=h.obj||null,e.status>=200&&e.status<300)n.response(h);else{if(!(0===e.status||e.status>=400&&e.status<599))return n.response(h);n.error(h)}},t.support.cors=!0,t.ajax(e)},u.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,i=e.headers||{},s=a[t](e.url);for(n in i)s.set(n,i[n]);e.enableCookies&&s.withCredentials(),e.body&&s.send(e.body),"function"==typeof s.buffer&&s.buffer(),s.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var i,a={url:e.url,method:e.method,headers:n.headers};if(!t&&n.error&&(t=n.error),t&&e.on&&e.on.error){if(a.errObj=t,a.status=n?n.status:500,a.statusText=n?n.text:t.message,n.headers&&n.headers["content-type"]&&n.headers["content-type"].indexOf("application/json")>=0)try{a.obj=JSON.parse(a.statusText)}catch(s){a.obj=null}i=e.on.error}else if(n&&e.on&&e.on.response){var l;if(n.body&&Object.keys(n.body).length>0)l=n.body;else try{l=o.safeLoad(n.text),l="string"==typeof l?null:l}catch(s){r.log("cannot parse JSON/YAML content")}a.obj="object"==typeof l?l:null,a.status=n.status,a.statusText=n.text,i=e.on.response}a.data=a.statusText,i&&i(a)})}},{"./helpers":4,"js-yaml":21,"lodash-compat/lang/isObject":146,superagent:161}],6:[function(e,t,n){"use strict";var i=e("./http"),r={isObject:e("lodash-compat/lang/isObject"),cloneDeep:e("lodash-compat/lang/cloneDeep"),isArray:e("lodash-compat/lang/isArray")},a=t.exports=function(){this.failedUrls=[]};a.prototype.processAllOf=function(e,t,n,i,r,a){var o,s,l;n["x-resolved-from"]=["#/definitions/"+t];var u=n.allOf;for(u.sort(function(e,t){return e.$ref&&t.$ref?0:e.$ref?-1:1}),o=0;o<u.length;o++)l=u[o],s="/definitions/"+t+"/allOf",this.resolveInline(e,a,l,i,r,s)},a.prototype.resolve=function(e,t,n,a){this.spec=e;var o,s,l=t,u=n,c=a,p={};"function"==typeof t&&(l=null,u=t,c=n);var h=l;this.scope=c||this,this.iteration=this.iteration||0,this.scope.options&&this.scope.options.requestInterceptor&&(p.requestInterceptor=this.scope.options.requestInterceptor),this.scope.options&&this.scope.options.responseInterceptor&&(p.responseInterceptor=this.scope.options.responseInterceptor);var f,d,m,g,y=0,v={},b={},w=[];e.definitions=e.definitions||{};for(f in e.definitions){var x=e.definitions[f];if(x.$ref)this.resolveInline(l,e,x,w,b,x);else{for(g in x.properties)m=x.properties[g],r.isArray(m.allOf)?this.processAllOf(l,f,m,w,b,e):this.resolveTo(l,m,w,"/definitions");x.allOf&&this.processAllOf(l,f,x,w,b,e)}}e.parameters=e.parameters||{};for(f in e.parameters){var A=e.parameters[f];if("body"===A["in"]&&A.schema)if(r.isArray(A.schema.allOf)){for(var O="inline_model",f=O,j=!1,_=0;!j;){if("undefined"==typeof e.definitions[f]){j=!0;break}f=O+"_"+_,_++}e.definitions[f]={allOf:A.schema.allOf},delete A.schema.allOf,A.schema.$ref="#/definitions/"+f,this.processAllOf(l,f,e.definitions[f],w,b,e)}else this.resolveTo(l,A.schema,w,o);A.$ref&&this.resolveInline(l,e,A,w,b,A.$ref)}for(f in e.paths){var S,k,C;d=e.paths[f];for(S in d)if("$ref"===S)o="/paths"+f,this.resolveInline(l,e,d,w,b,o);else{k=d[S];var E=d.parameters||[],I=k.parameters||[];for(s in E){var A=E[s];I.unshift(A)}"parameters"!==S&&r.isObject(k)&&(k.parameters=k.parameters||I);for(s in I){var A=I[s];if(o="/paths"+f+"/"+S+"/parameters","body"===A["in"]&&A.schema)if(r.isArray(A.schema.allOf)){for(var O="inline_model",f=O,j=!1,_=0;!j;){if("undefined"==typeof e.definitions[f]){j=!0;break}f=O+"_"+_,_++}e.definitions[f]={allOf:A.schema.allOf},delete A.schema.allOf,A.schema.$ref="#/definitions/"+f,this.processAllOf(l,f,e.definitions[f],w,b,e)}else this.resolveTo(l,A.schema,w,o);A.$ref&&this.resolveInline(l,e,A,w,b,A.$ref)}for(C in k.responses){var T=k.responses[C];if(o="/paths"+f+"/"+S+"/responses/"+C,r.isObject(T)&&(T.$ref&&this.resolveInline(l,e,T,w,b,o),T.schema)){var $=T;if(r.isArray($.schema.allOf)){for(var O="inline_model",f=O,j=!1,_=0;!j;){if("undefined"==typeof e.definitions[f]){j=!0;break}f=O+"_"+_,_++}e.definitions[f]={allOf:$.schema.allOf},delete $.schema.allOf,delete $.schema.type,$.schema.$ref="#/definitions/"+f,this.processAllOf(l,f,e.definitions[f],w,b,e)}else"array"===$.schema.type?$.schema.items&&$.schema.items.$ref&&this.resolveInline(l,e,$.schema.items,w,b,o):this.resolveTo(l,T.schema,w,o)}}}d.parameters=[]}var U,M=0,P=[],L=w;for(s=0;s<L.length;s++){var D=L[s];if(l===D.root){if("ref"===D.resolveAs){var R,N=((D.root||"")+"/"+D.key).split("/"),F=[],B="";if(D.key.indexOf("../")>=0){for(var V=0;V<N.length;V++)".."===N[V]?F=F.slice(0,F.length-1):F.push(N[V]);for(R=0;R<F.length;R++)R>0&&(B+="/"),B+=F[R];D.root=B,P.push(D)}else if(U=D.key.split("#"),2===U.length){0!==U[0].indexOf("http://")&&0!==U[0].indexOf("https://")||(D.root=U[0]),o=U[1].split("/");var q,z=e;for(R=0;R<o.length;R++){var H=o[R];if(""!==H){if(z=z[H],"undefined"==typeof z){q=null;break}q=z}}null===q&&P.push(D)}}else if("inline"===D.resolveAs){if(D.key&&-1===D.key.indexOf("#")&&"/"!==D.key.charAt(0)){for(U=D.root.split("/"),o="",s=0;s<U.length-1;s++)o+=U[s]+"/";o+=D.key,D.root=o,D.location=""}P.push(D)}}else P.push(D)}M=P.length;for(var J=0;J<P.length;J++)!function(e,t,n){if(e.root&&e.root!==l)if(-1===n.failedUrls.indexOf(e.root)){var r={useJQuery:!1,url:e.root,method:"get",headers:{accept:n.scope.swaggerRequestHeaders||"application/json"},on:{error:function(i){y+=1,console.log("failed url: "+r.url),n.failedUrls.push(r.url),b[e.key]={root:e.root,location:e.location},y===M&&n.finish(t,h,w,v,b,u)},response:function(i){var r=i.obj;n.resolveItem(r,e.root,w,v,b,e),y+=1,y===M&&n.finish(t,h,w,v,b,u)}}};c&&c.clientAuthorizations&&c.clientAuthorizations.apply(r),(new i).execute(r,p)}else y+=1,b[e.key]={root:e.root,location:e.location},y===M&&n.finish(t,h,w,v,b,u);else n.resolveItem(t,h,w,v,b,e),y+=1,y===M&&n.finish(t,l,w,v,b,u,!0)}(P[J],e,this);0===Object.keys(P).length&&this.finish(e,h,w,v,b,u)},a.prototype.resolveItem=function(e,t,n,i,r,a){var o=a.location,s=e,l=o.split("/");if(""!==o)for(var u=0;u<l.length;u++){var c=l[u];if(-1!==c.indexOf("~1")&&(c=l[u].replace(/~0/g,"~").replace(/~1/g,"/"),"/"!==c.charAt(0)&&(c="/"+c)),"undefined"==typeof s||null===s)break;if(""===c&&u===l.length-1&&l.length>1){s=null;break}c.length>0&&(s=s[c])}var p=a.key;l=a.key.split("/");var h=l[l.length-1];h.indexOf("#")>=0&&(h=h.split("#")[1]),null!==s&&"undefined"!=typeof s?i[p]={name:h,obj:s,key:a.key,root:a.root}:r[p]={root:a.root,location:a.location}},a.prototype.finish=function(e,t,n,i,r,a,o){var s;for(s in n){var l=n[s],u=l.key,c=i[u];if(c)if(e.definitions=e.definitions||{},"ref"===l.resolveAs){if(o!==!0)for(u in c.obj)var p=this.retainRoot(c.obj[u],l.root);e.definitions[c.name]=c.obj,l.obj.$ref="#/definitions/"+c.name}else if("inline"===l.resolveAs){var h=l.obj;h["x-resolved-from"]=[l.key],delete h.$ref;for(u in c.obj){var p=c.obj[u];o!==!0&&(p=this.retainRoot(c.obj[u],l.root)),h[u]=p}}}var f=this.countUnresolvedRefs(e);0===f||this.iteration>5?(this.resolveAllOf(e.definitions),a.call(this.scope,e,r)):(this.iteration+=1,this.resolve(e,t,a,this.scope))},a.prototype.countUnresolvedRefs=function(e){var t,n=this.getRefs(e),i=[],r=[];for(t in n)0===t.indexOf("#")?i.push(t.substring(1)):r.push(t);for(t=0;t<i.length;t++)for(var a=i[t],o=a.split("/"),s=e,l=0;l<o.length;l++){var u=o[l];if(""!==u&&(s=s[u],"undefined"==typeof s)){r.push(a);break}}return r.length},a.prototype.getRefs=function(e,t){t=t||e;var n={};for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];if("$ref"===i&&"string"==typeof a)n[a]=null;else if(r.isObject(a)){var o=this.getRefs(a);for(var s in o)n[s]=null}}return n},a.prototype.retainRoot=function(e,t){for(var n in e){var i=e[n];if("$ref"===n&&"string"==typeof i){if(0!==i.indexOf("http://")&&0!==i.indexOf("https://")){var a=!0;if(t){var o=t.slice(-1);if("/"!==o&&0!==i.indexOf("#")&&0!==i.indexOf("http://")&&i.indexOf("https://")){console.log("working with "+i),a=!1;var s=t.split("/");s=s.splice(0,s.length-1),t="";for(var l=0;l<s.length;l++)t+=s[l]+"/"}}0!==i.indexOf("#")&&a&&(i="#"+i),i=(t||"")+i,e[n]=i}}else r.isObject(i)&&this.retainRoot(i,t)}return e},a.prototype.resolveInline=function(e,t,n,i,r,a){var o,s,l,u,c=n.$ref,p=n.$ref,h=!1;if(e=e||"",p){if(0===p.indexOf("../")){for(s=p.split("../"),l=e.split("/"),p="",o=0;o<s.length;o++)""===s[o]?l=l.slice(0,l.length-1):p+=s[o];for(e="",o=0;o<l.length-1;o++)o>0&&(e+="/"),e+=l[o];h=!0}if(p.indexOf("#")>=0)if(0===p.indexOf("/"))u=p.split("#"),s=e.split("//"),l=s[1].split("/"),e=s[0]+"//"+l[0]+u[0],a=u[1];else{if(u=p.split("#"),""!==u[0]){if(l=e.split("/"),l=l.slice(0,l.length-1),!h){e="";for(var f=0;f<l.length;f++)f>0&&(e+="/"),e+=l[f]}e+="/"+p.split("#")[0]}a=u[1]}if(0===p.indexOf("http"))p.indexOf("#")>=0?(e=p.split("#")[0],a=p.split("#")[1]):(e=p,a=""),i.push({obj:n,resolveAs:"inline",root:e,key:c,location:a});else if(0===p.indexOf("#"))a=p.split("#")[1],i.push({obj:n,resolveAs:"inline",root:e,key:c,location:a});else if(0===p.indexOf("/")&&-1===p.indexOf("#")){a=p;var d=e.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);d&&(e=d[0]+p.substring(1),a=""),i.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else i.push({obj:n,resolveAs:"inline",root:e,key:c,location:a})}else"array"===n.type&&this.resolveTo(e,n.items,i,a)},a.prototype.resolveTo=function(e,t,n,i){var a,o,s=t.$ref,l=e;if("undefined"!=typeof s&&null!==s){if(s.indexOf("#")>=0){var u=s.split("#");if(u[0]&&0===s.indexOf("/"));else if(u[0]&&0===u[0].indexOf("http"))l=u[0],s=u[1];else if(u[0]&&u[0].length>0){for(a=e.split("/"),l="",o=0;o<a.length-1;o++)l+=a[o]+"/";l+=u[0]}i=u[1]}else if(0===s.indexOf("http://")||0===s.indexOf("https://"))l=s,i="";else{for(a=e.split("/"),l="",o=0;o<a.length-1;o++)l+=a[o]+"/";l+=s,i=""}n.push({obj:t,resolveAs:"ref",root:l,key:s,location:i})}else if("array"===t.type){var c=t.items;this.resolveTo(e,c,n,i)}else if(t&&t.properties){var p=this.uniqueName("inline_model");t.title&&(p=this.uniqueName(t.title)),delete t.title,this.spec.definitions[p]=r.cloneDeep(t),t.$ref="#/definitions/"+p,delete t.type,delete t.properties}},a.prototype.uniqueName=function(e){for(var t=e,n=0;;){if(!r.isObject(this.spec.definitions[t]))return t;t=e+"_"+n,n++}},a.prototype.resolveAllOf=function(e,t,n){n=n||0,t=t||e;var i;for(var a in t)if(t.hasOwnProperty(a)){var o=t[a];if(null===o)throw new TypeError("Swagger 2.0 does not support null types ("+t+").  See https://github.com/swagger-api/swagger-spec/issues/229.");if("object"==typeof o&&this.resolveAllOf(e,o,n+1),o&&"undefined"!=typeof o.allOf){var s=o.allOf;if(r.isArray(s)){var l=r.cloneDeep(o);delete l.allOf,l["x-composed"]=!0,"undefined"!=typeof o["x-resolved-from"]&&(l["x-resolved-from"]=o["x-resolved-from"]);for(var u=0;u<s.length;u++){var c=s[u],p="self";"undefined"!=typeof c["x-resolved-from"]&&(p=c["x-resolved-from"][0]);for(var h in c)if(l.hasOwnProperty(h))if("properties"===h){var f=c[h];for(i in f){l.properties[i]=r.cloneDeep(f[i]);var d=f[i]["x-resolved-from"];"undefined"!=typeof d&&"self"!==d||(d=p),l.properties[i]["x-resolved-from"]=d}}else if("required"===h){for(var m=l.required.concat(c[h]),g=0;g<m.length;++g)for(var y=g+1;y<m.length;++y)m[g]===m[y]&&m.splice(y--,1);l.required=m}else"x-resolved-from"===h&&l["x-resolved-from"].push(p);else if(l[h]=r.cloneDeep(c[h]),"properties"===h)for(i in l[h])l[h][i]["x-resolved-from"]=p}t[a]=l}}}}},{"./http":5,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isObject":146}],7:[function(e,t,n){"use strict";function i(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"}function r(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n}function a(e,t){var n="";return"undefined"!=typeof e.$ref?n+=l.simpleRef(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=a(e.items||e.$ref||{}):(n+="Array[",n+=a(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?l.simpleRef(e.$ref):e.type,n}function o(e,t,n,i){e=l.resolveSchema(e),"function"!=typeof i&&(i=function(e){return(e||{})["default"]}),n=n||{};var r,a,s=e.type||"object",c=e.format;return u.isUndefined(e.example)?u.isUndefined(e.items)&&u.isArray(e["enum"])&&(a=e["enum"][0]):a=e.example,u.isUndefined(a)&&(e.$ref?(r=t[l.simpleRef(e.$ref)],u.isUndefined(r)||(u.isUndefined(n[r.name])?(n[r.name]=r,a=o(r.definition,t,n,i),delete n[r.name]):a="array"===r.type?[]:{})):u.isUndefined(e["default"])?"string"===s?a="date-time"===c?(new Date).toISOString():"date"===c?(new Date).toISOString().split("T")[0]:"string":"integer"===s?a=0:"number"===s?a=0:"boolean"===s?a=!0:"object"===s?(a={},u.forEach(e.properties,function(e,r){var s=u.cloneDeep(e);s["default"]=i(e),a[r]=o(s,t,n,i)})):"array"===s&&(a=[],u.isArray(e.items)?u.forEach(e.items,function(e){a.push(o(e,t,n,i))}):u.isPlainObject(e.items)?a.push(o(e.items,t,n,i)):u.isUndefined(e.items)?a.push({}):l.log("Array type's 'items' property is not an array or an object, cannot process")):a=e["default"]),a}function s(e,t,n,r){function a(e,t,i){var r,a=t;return e.$ref?(a=e.title||l.simpleRef(e.$ref),r=n[a]):u.isUndefined(t)&&(a=e.title||"Inline Model "+ ++m,r={definition:e}),i!==!0&&(f[a]=u.isUndefined(r)?{}:r.definition),a}function o(e){var t='<span class="propType">',n=e.type||"object";return e.$ref?t+=a(e,l.simpleRef(e.$ref)):"object"===n?t+=u.isUndefined(e.properties)?"object":a(e):"array"===n?(t+="Array[",u.isArray(e.items)?t+=u.map(e.items,a).join(","):u.isPlainObject(e.items)?t+=u.isUndefined(e.items.$ref)?u.isUndefined(e.items.type)||-1!==u.indexOf(["array","object"],e.items.type)?a(e.items):e.items.type:a(e.items,l.simpleRef(e.items.$ref)):(l.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+="</span>"}function s(e,t){var n="",r=e.type||"object",a="array"===r;switch(a&&(r=u.isPlainObject(e.items)&&!u.isUndefined(e.items.type)?e.items.type:"object"),u.isUndefined(e["default"])||(n+=i("Default",e["default"])),r){case"string":e.minLength&&(n+=i("Min. Length",e.minLength)),e.maxLength&&(n+=i("Max. Length",e.maxLength)),e.pattern&&(n+=i("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=i("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=i("Exclusive Min.","true")),e.maximum&&(n+=i("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=i("Exclusive Max.","true")),e.multipleOf&&(n+=i("Multiple Of",e.multipleOf))}if(a&&(e.minItems&&(n+=i("Min. Items",e.minItems)),e.maxItems&&(n+=i("Max. Items",e.maxItems)),e.uniqueItems&&(n+=i("Unique Items","true")),e.collectionFormat&&(n+=i("Coll. Format",e.collectionFormat))),u.isUndefined(e.items)&&u.isArray(e["enum"])){var o;o="number"===r||"integer"===r?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=i("Enum",o)}return n.length>0&&(t='<span class="propWrap">'+t+'<table class="optionsWrapper"><tr><th colspan="2">'+r+"</th></tr>"+n+"</table></span>"),t}function c(e,t){var i=e.type||"object",c="array"===e.type,f=p+t+" "+(c?"[":"{")+h;if(t&&d.push(t),c)u.isArray(e.items)?f+="<div>"+u.map(e.items,function(e){var t=e.type||"object";return u.isUndefined(e.$ref)?u.indexOf(["array","object"],t)>-1?"object"===t&&u.isUndefined(e.properties)?"object":a(e):s(e,t):a(e,l.simpleRef(e.$ref))}).join(",</div><div>"):u.isPlainObject(e.items)?f+=u.isUndefined(e.items.$ref)?u.indexOf(["array","object"],e.items.type||"object")>-1?(u.isUndefined(e.items.type)||"object"===e.items.type)&&u.isUndefined(e.items.properties)?"<div>object</div>":"<div>"+a(e.items)+"</div>":"<div>"+s(e.items,e.items.type)+"</div>":"<div>"+a(e.items,l.simpleRef(e.items.$ref))+"</div>":(l.log("Array type's 'items' property is not an array or an object, cannot process"),f+="<div>object</div>");else if(e.$ref)f+="<div>"+a(e,t)+"</div>";else if("object"===i){if(u.isPlainObject(e.properties)){var m=u.map(e.properties,function(t,i){var a,c,p=u.indexOf(e.required,i)>=0,h=u.cloneDeep(t),f=p?"required":"",d='<span class="propName '+f+'">'+i+"</span> (";return h["default"]=r(h),h=l.resolveSchema(h),c=t.description||h.description,u.isUndefined(h.$ref)||(a=n[l.simpleRef(h.$ref)],u.isUndefined(a)||-1!==u.indexOf([void 0,"array","object"],a.definition.type)||(h=l.resolveSchema(a.definition))),d+=o(h),p||(d+=', <span class="propOptKey">optional</span>'),t.readOnly&&(d+=', <span class="propReadOnly">read only</span>'),d+=")",u.isUndefined(c)||(d+=': <span class="propDesc">'+c+"</span>"),h["enum"]&&(d+=' = <span class="propVals">[\''+h["enum"].join("', '")+"']</span>"),"<div"+(t.readOnly?' class="readOnly"':"")+">"+s(h,d)}).join(",</div>");m&&(f+=m+"</div>")}}else f+="<div>"+s(e,i)+"</div>";return f+p+(c?"]":"}")+h}var p='<span class="strong">',h="</span>";if(u.isObject(arguments[0])&&(e=void 0,t=arguments[0],n=arguments[1],r=arguments[2]),n=n||{},t=l.resolveSchema(t),u.isEmpty(t))return p+"Empty"+h;if("string"==typeof t.$ref&&(e=l.simpleRef(t.$ref),t=n[e],"undefined"==typeof t))return p+e+" is not defined!"+h;"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof r&&(r=function(e){return(e||{})["default"]});for(var f={},d=[],m=0,g=c(t,e);u.keys(f).length>0;)u.forEach(f,function(e,t){var n=u.indexOf(d,t)>-1;delete f[t],n||(d.push(t),g+="<br />"+c(e,t))});return g}var l=e("./helpers"),u={isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined"),isArray:e("lodash-compat/lang/isArray"),isObject:e("lodash-compat/lang/isObject"),isEmpty:e("lodash-compat/lang/isEmpty"),map:e("lodash-compat/collection/map"),indexOf:e("lodash-compat/array/indexOf"),cloneDeep:e("lodash-compat/lang/cloneDeep"),keys:e("lodash-compat/object/keys"),forEach:e("lodash-compat/collection/forEach")};t.exports.optionHtml=i,t.exports.typeFromJsonSchema=r,t.exports.getStringSignature=a,t.exports.schemaToHTML=s,t.exports.schemaToJSON=o},{"./helpers":4,"lodash-compat/array/indexOf":51,"lodash-compat/collection/forEach":56,"lodash-compat/collection/map":58,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isArray":142,"lodash-compat/lang/isEmpty":143,"lodash-compat/lang/isObject":146,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isUndefined":150,"lodash-compat/object/keys":151}],8:[function(e,t,n){"use strict";var i=e("./http"),r={isObject:e("lodash-compat/lang/isObject")},a=t.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};a.prototype.setDocumentationLocation=function(e){this.docLocation=e},a.prototype.convert=function(e,t,n,i){if(!e||!Array.isArray(e.apis))return this.finish(i,null);this.clientAuthorizations=t;var r={swagger:"2.0"};r.originalVersion=e.swaggerVersion,this.apiInfo(e,r),this.securityDefinitions(e,r),e.basePath&&this.setDocumentationLocation(e.basePath);var a,o=!1;for(a=0;a<e.apis.length;a++){var s=e.apis[a];Array.isArray(s.operations)&&(o=!0)}o?(this.declaration(e,r),this.finish(i,r)):this.resourceListing(e,r,n,i)},a.prototype.declaration=function(e,t){var n,i,a,o;if(e.apis){0===e.basePath.indexOf("http://")?(a=e.basePath.substring("http://".length),o=a.indexOf("/"),o>0?(t.host=a.substring(0,o),t.basePath=a.substring(o)):(t.host=a,t.basePath="/")):0===e.basePath.indexOf("https://")?(a=e.basePath.substring("https://".length),o=a.indexOf("/"),o>0?(t.host=a.substring(0,o),t.basePath=a.substring(o)):(t.host=a,t.basePath="/")):t.basePath=e.basePath;var s;if(e.authorizations&&(s=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),r.isObject(e))for(n in e.models){var l=e.models[n],u=l.id||n;this.modelMap[u]=n}for(i=0;i<e.apis.length;i++){var c=e.apis[i],p=c.path,h=c.operations;this.operations(p,e.resourcePath,h,s,t)}var f=e.models||{};this.models(f,t)}},a.prototype.models=function(e,t){if(r.isObject(e)){var n;t.definitions=t.definitions||{};for(n in e){var i,a=e[n],o=[],s={properties:{}};for(i in a.properties){var l=a.properties[i],u={};this.dataType(l,u),l.description&&(u.description=l.description),l["enum"]&&(u["enum"]=l["enum"]),"boolean"==typeof l.required&&l.required===!0&&o.push(i),"string"==typeof l.required&&"true"===l.required&&o.push(i),s.properties[i]=u}o.length>0?s.required=o:s.required=a.required,t.definitions[n]=s}}},a.prototype.extractTag=function(e){var t=e||"default";return 0!==t.indexOf("http:")&&0!==t.indexOf("https:")||(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},a.prototype.operations=function(e,t,n,i,r){if(Array.isArray(n)){var a;r.paths||(r.paths={});var o=r.paths[e]||{},s=this.extractTag(t);r.tags=r.tags||[];var l=!1;for(a=0;a<r.tags.length;a++){var u=r.tags[a];u.name===s&&(l=!0)}for(l||r.tags.push({name:s}),a=0;a<n.length;a++){var c=n[a],p=(c.method||c.httpMethod).toLowerCase(),h={tags:[s]},f=c.authorizations;if(f&&0===Object.keys(f).length&&(f=i),"undefined"!=typeof f){var d;for(var m in f){h.security=h.security||[];var g=f[m];if(g){var y=[];for(var v in g)y.push(g[v].scope);d={},d[m]=y,h.security.push(d)}else d={},d[m]=[],h.security.push(d)}}c.consumes?h.consumes=c.consumes:r.consumes&&(h.consumes=r.consumes),c.produces?h.produces=c.produces:r.produces&&(h.produces=r.produces),c.summary&&(h.summary=c.summary),c.notes&&(h.description=c.notes),c.nickname&&(h.operationId=c.nickname),c.deprecated&&(h.deprecated=c.deprecated),this.authorizations(f,r),this.parameters(h,c.parameters,r),this.responseMessages(h,c,r),o[p]=h}r.paths[e]=o}},a.prototype.responseMessages=function(e,t){if(r.isObject(t)){var n={};this.dataType(t,n),!n.schema&&n.type&&(n={schema:n}),e.responses=e.responses||{};var i=!1;if(Array.isArray(t.responseMessages)){var a,o=t.responseMessages;for(a=0;a<o.length;a++){var s=o[a],l={description:s.message};200===s.code&&(i=!0),s.responseModel&&(l.schema={$ref:"#/definitions/"+s.responseModel}),e.responses[""+s.code]=l}}i?e.responses["default"]=n:e.responses[200]=n}},a.prototype.authorizations=function(e){!r.isObject(e)},a.prototype.parameters=function(e,t){if(Array.isArray(t)){var n;for(n=0;n<t.length;n++){var i=t[n],r={};if(r.name=i.name,r.description=i.description,r.required=i.required,r["in"]=i.paramType,"body"===r["in"]&&(r.name="body"),"form"===r["in"]&&(r["in"]="formData"),i["enum"]&&(r["enum"]=i["enum"]),i.allowMultiple===!0||"true"===i.allowMultiple){var a={};if(this.dataType(i,a),r.type="array",r.items=a,i.allowableValues){var o=i.allowableValues;"LIST"===o.valueType&&(r["enum"]=o.values)}}else this.dataType(i,r);"undefined"!=typeof i.defaultValue&&(r["default"]=i.defaultValue),e.parameters=e.parameters||[],e.parameters.push(r)}}},a.prototype.dataType=function(e,t){if(r.isObject(e)){e.minimum&&(t.minimum=e.minimum),e.maximum&&(t.maximum=e.maximum),e.format&&(t.format=e.format),"undefined"!=typeof e.defaultValue&&(t["default"]=e.defaultValue);var n=this.toJsonSchema(e);n&&(t=t||{},n.type&&(t.type=n.type),n.format&&(t.format=n.format),n.$ref&&(t.schema={$ref:n.$ref}),n.items&&(t.items=n.items))}},a.prototype.toJsonSchema=function(e){if(!e)return"object";var t=e.type||e.dataType||e.responseClass||"",n=t.toLowerCase(),i=(e.format||"").toLowerCase();if(0===n.indexOf("list[")){var r=t.substring(5,t.length-1),a=this.toJsonSchema({type:r});return{type:"array",items:a}}if("int"===n||"integer"===n&&"int32"===i)return{type:"integer",format:"int32"};if("long"===n||"integer"===n&&"int64"===i)return{type:"integer",format:"int64"};if("integer"===n)return{type:"integer",format:"int64"};if("float"===n||"number"===n&&"float"===i)return{type:"number",format:"float"};if("double"===n||"number"===n&&"double"===i)return{type:"number",format:"double"};if("string"===n&&"date-time"===i||"date"===n)return{type:"string",format:"date-time"};if("string"===n)return{type:"string"};if("file"===n)return{type:"file"};if("boolean"===n)return{type:"boolean"};if("boolean"===n)return{type:"boolean"};if("array"===n||"list"===n){if(e.items){var o=this.toJsonSchema(e.items);return{type:"array",items:o}}return{type:"array",items:{type:"object"}}}return e.$ref?{$ref:this.modelMap[e.$ref]?"#/definitions/"+this.modelMap[e.$ref]:e.$ref}:"void"===n||""===n?{}:this.modelMap[e.type]?{$ref:"#/definitions/"+this.modelMap[e.type]}:{type:e.type}},a.prototype.resourceListing=function(e,t,n,r){var a,o=0,s=this,l=e.apis.length,u=t,c={};n&&n.requestInterceptor&&(c.requestInterceptor=n.requestInterceptor),n&&n.responseInterceptor&&(c.responseInterceptor=n.responseInterceptor);var p="application/json";for(n&&n.swaggerRequestHeaders&&(p=n.swaggerRequestHeaders),0===l&&this.finish(r,t),a=0;l>a;a++){var h=e.apis[a],f=h.path,d=this.getAbsolutePath(e.swaggerVersion,this.docLocation,f);h.description&&(t.tags=t.tags||[],t.tags.push({name:this.extractTag(h.path),description:h.description||""}));var m={url:d,headers:{accept:p},on:{},method:"get"};m.on.response=function(e){o+=1;var t=e.obj;t&&s.declaration(t,u),o===l&&s.finish(r,u)},m.on.error=function(e){console.error(e),o+=1,o===l&&s.finish(r,u)},this.clientAuthorizations&&"function"==typeof this.clientAuthorizations.apply&&this.clientAuthorizations.apply(m),(new i).execute(m,c)}},a.prototype.getAbsolutePath=function(e,t,n){if("1.0"===e&&t.endsWith(".json")){var i=t.lastIndexOf("/");i>0&&(t=t.substring(0,i))}var r=t;return 0===n.indexOf("http://")||0===n.indexOf("https://")?r=n:(t.endsWith("/")&&(r=t.substring(0,t.length-1)),r+=n),r=r.replace("{format}","json")},a.prototype.securityDefinitions=function(e,t){if(e.authorizations){var n;for(n in e.authorizations){var i=!1,r={},a=e.authorizations[n];if("apiKey"===a.type)r.type="apiKey",r["in"]=a.passAs,r.name=a.keyname||n,i=!0;else if("basicAuth"===a.type)r.type="basicAuth",i=!0;else if("oauth2"===a.type){var o,s=a.scopes||[],l={};for(o in s){var u=s[o];l[u.scope]=u.description}if(r.type="oauth2",o>0&&(r.scopes=l),a.grantTypes){if(a.grantTypes.implicit){var c=a.grantTypes.implicit;r.flow="implicit",r.authorizationUrl=c.loginEndpoint,i=!0}if(a.grantTypes.authorization_code&&!r.flow){var p=a.grantTypes.authorization_code;r.flow="accessCode",r.authorizationUrl=p.tokenRequestEndpoint.url,r.tokenUrl=p.tokenEndpoint.url,i=!0}}}i&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[n]=r)}}},a.prototype.apiInfo=function(e,t){if(e.info){var n=e.info;t.info={},n.contact&&(t.info.contact={},t.info.contact.email=n.contact),n.description&&(t.info.description=n.description),n.title&&(t.info.title=n.title),n.termsOfServiceUrl&&(t.info.termsOfService=n.termsOfServiceUrl),(n.license||n.licenseUrl)&&(t.license={},n.license&&(t.license.name=n.license),n.licenseUrl&&(t.license.url=n.licenseUrl))}else this.warnings.push("missing info section")},a.prototype.finish=function(e,t){e(t)}},{"./http":5,"lodash-compat/lang/isObject":146}],9:[function(e,t,n){"use strict";var i=(e("../helpers").log,{isPlainObject:e("lodash-compat/lang/isPlainObject"),isString:e("lodash-compat/lang/isString")}),r=e("../schema-markup.js"),a=e("js-yaml"),o=t.exports=function(e,t,n,i){return this.definition=t||{},this.isArray="array"===t.type,this.models=n||{},this.name=e||t.title||"Inline Model",this.modelPropertyMacro=i||function(e){return e["default"]},this};o.prototype.createJSONSample=o.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&i.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],i.isString(this.definition.example)&&(this.definition.example=a.safeLoad(this.definition.example))):this.definition.example||(this.definition.example=this.examples),r.schemaToJSON(this.definition,this.models,e,this.modelPropertyMacro)},o.prototype.getMockSignature=function(){return r.schemaToHTML(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../helpers":4,"../schema-markup.js":7,"js-yaml":21,"lodash-compat/lang/isPlainObject":147,"lodash-compat/lang/isString":148}],10:[function(e,t,n){"use strict";function i(e,t){if(r.isEmpty(t))return e[0];for(var n=0,i=t.length;i>n;n++)if(e.indexOf(t[n])>-1)return t[n];return e[0]}var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),isUndefined:e("lodash-compat/lang/isUndefined"),isEmpty:e("lodash-compat/lang/isEmpty"),isObject:e("lodash-compat/lang/isObject")},a=e("../helpers"),o=e("./model"),s=e("../http"),l=e("q"),u=t.exports=function(e,t,n,i,r,a,s,l,u){\r
+var c=[];if(e=e||{},a=a||{},e&&e.options&&(this.client=e.options.client||null,this.requestInterceptor=e.options.requestInterceptor||null,this.responseInterceptor=e.options.responseInterceptor||null),this.authorizations=a.security,this.basePath=e.basePath||"/",this.clientAuthorizations=u,this.consumes=a.consumes||e.consumes||["application/json"],this.produces=a.produces||e.produces||["application/json"],this.deprecated=a.deprecated,this.description=a.description,this.host=e.host||"localhost",this.method=i||c.push("Operation "+n+" is missing method."),this.models=l||{},this.nickname=n||c.push("Operations must have a nickname."),this.operation=a,this.operations={},this.parameters=null!==a?a.parameters||[]:{},this.parent=e,this.path=r||c.push("Operation "+this.nickname+" is missing path."),this.responses=a.responses||{},this.scheme=t||e.scheme||"http",this.schemes=a.schemes||e.schemes,this.security=a.security||e.security,this.summary=a.summary||"",this.type=null,this.useJQuery=e.useJQuery,this.enableCookies=e.enableCookies,this.parameterMacro=e.parameterMacro||function(e,t){return t["default"]},this.inlineModels=[],"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.deprecated=Boolean(this.deprecated)}var p,h;if(s){var f;for(f in s)h=new o(f,s[f],this.models,e.modelPropertyMacro),h&&(this.models[f]=h)}else s={};for(p=0;p<this.parameters.length;p++){var d=this.parameters[p];d["default"]=this.parameterMacro(this,d),"array"===d.type&&(d.isList=!0,d.allowMultiple=!0);var m=this.getType(d);if(m&&"boolean"===m.toString().toLowerCase()&&(d.allowableValues={},d.isList=!0,d["enum"]=[!0,!1]),"undefined"!=typeof d["x-example"]){var g=d["x-example"];d["default"]=g}if(d["x-examples"]){var g=d["x-examples"]["default"];"undefined"!=typeof g&&(d["default"]=g)}var y=d["enum"]||d.items&&d.items["enum"];if("undefined"!=typeof y){var v;for(d.allowableValues={},d.allowableValues.values=[],d.allowableValues.descriptiveValues=[],v=0;v<y.length;v++){var b=y[v],w=b===d["default"]||b+""===d["default"];d.allowableValues.values.push(b),d.allowableValues.descriptiveValues.push({value:b+"",isDefault:w})}}"array"===d.type&&(m=[m],"undefined"==typeof d.allowableValues&&(delete d.isList,delete d.allowMultiple)),d.modelSignature={type:m,definitions:this.models},d.signature=this.getModelSignature(m,this.models).toString(),d.sampleJSON=this.getModelSampleJSON(m,this.models),d.responseClassSignature=d.signature}var x,A,O=this.responses;if(O[200]?(A=O[200],x="200"):O[201]?(A=O[201],x="201"):O[202]?(A=O[202],x="202"):O[203]?(A=O[203],x="203"):O[204]?(A=O[204],x="204"):O[205]?(A=O[205],x="205"):O[206]?(A=O[206],x="206"):O["default"]&&(A=O["default"],x="default"),A&&A.schema){var j,_=this.resolveModel(A.schema,s);delete O[x],_?(this.successResponse={},j=this.successResponse[x]=_):A.schema.type&&"object"!==A.schema.type&&"array"!==A.schema.type?(this.successResponse={},j=this.successResponse[x]=A.schema):(this.successResponse={},j=this.successResponse[x]=new o(void 0,A.schema||{},this.models,e.modelPropertyMacro)),j&&(A.description&&(j.description=A.description),A.examples&&(j.examples=A.examples),A.headers&&(j.headers=A.headers)),this.type=A}return c.length>0&&this.resource&&this.resource.api&&this.resource.api.fail&&this.resource.api.fail(c),this};u.prototype.isDefaultArrayItemValue=function(e,t){return t["default"]&&Array.isArray(t["default"])?-1!==t["default"].indexOf(e):e===t["default"]},u.prototype.getType=function(e){var t,n=e.type,i=e.format,r=!1;"integer"===n&&"int32"===i?t="integer":"integer"===n&&"int64"===i?t="long":"integer"===n?t="integer":"string"===n?t="date-time"===i?"date-time":"date"===i?"date":"string":"number"===n&&"float"===i?t="float":"number"===n&&"double"===i?t="double":"number"===n?t="double":"boolean"===n?t="boolean":"array"===n?(r=!0,e.items&&(t=this.getType(e.items))):"file"===n&&(t="file"),e.$ref&&(t=a.simpleRef(e.$ref));var o=e.schema;if(o){var s=o.$ref;return s?(s=a.simpleRef(s),r?[s]:s):"object"===o.type?this.addInlineModel(o):this.getType(o)}return r?[t]:t},u.prototype.addInlineModel=function(e){var t=this.inlineModels.length,n=this.resolveModel(e,{});return n?(this.inlineModels.push(n),"Inline Model "+t):null},u.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},u.prototype.resolveModel=function(e,t){if("undefined"!=typeof e.$ref){var n=e.$ref;if(0===n.indexOf("#/definitions/")&&(n=n.substring("#/definitions/".length)),t[n])return new o(n,t[n],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||r.isUndefined(e.type)))return new o(void 0,e,this.models,this.parent.modelPropertyMacro);return null},u.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",n=0;n<this.parameters.length;n++){var i=this.parameters[n],r=i.signature;t+="\n  * "+i.name+" ("+r+"): "+i.description}return"undefined"==typeof e&&a.log(t),t},u.prototype.getModelSignature=function(e,t){var n,i;return e instanceof Array&&(i=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):this.getInlineModel(e)?(e=this.getInlineModel(e),n=!1):n=!0,n?i?"Array["+e+"]":e.toString():i?"Array["+e.getMockSignature()+"]":e.getMockSignature()},u.prototype.supportHeaderParams=function(){return!0},u.prototype.supportedSubmitMethods=function(){return this.parent.supportedSubmitMethods},u.prototype.getHeaderParams=function(e){for(var t=this.setContentTypes(e,{}),n=0;n<this.parameters.length;n++){var i=this.parameters[n];if("undefined"!=typeof e[i.name]&&"header"===i["in"]){var r=e[i.name];Array.isArray(r)&&(r=r.toString()),t[i.name]=r}}return t},u.prototype.urlify=function(e){for(var t={},n=this.path,i="",r=0;r<this.parameters.length;r++){var a=this.parameters[r];if("undefined"!=typeof e[a.name])if("path"===a["in"]){var o=new RegExp("{"+a.name+"}","gi"),s=e[a.name];s=Array.isArray(s)?this.encodePathCollection(a.collectionFormat,a.name,s):this.encodePathParam(s),n=n.replace(o,s)}else if("query"===a["in"]&&"undefined"!=typeof e[a.name])if(i+=""===i?"?":"&","undefined"!=typeof a.collectionFormat){var l=e[a.name];i+=Array.isArray(l)?this.encodeQueryCollection(a.collectionFormat,a.name,l):this.encodeQueryParam(a.name)+"="+this.encodeQueryParam(e[a.name])}else i+=this.encodeQueryParam(a.name)+"="+this.encodeQueryParam(e[a.name]);else"formData"===a["in"]&&(t[a.name]=e[a.name])}var u=this.scheme+"://"+this.host;return"/"!==this.basePath&&(u+=this.basePath),u+n+i},u.prototype.getMissingParams=function(e){var t,n=[];for(t=0;t<this.parameters.length;t++){var i=this.parameters[t];i.required===!0&&"undefined"==typeof e[i.name]&&(n=i.name)}return n},u.prototype.getBody=function(e,t,n){for(var i,r,a,o,s={},l=!1,u=0;u<this.parameters.length;u++){var c=this.parameters[u];"undefined"!=typeof t[c.name]?"body"===c["in"]?r=t[c.name]:"formData"===c["in"]&&(s[c.name]=t[c.name],i=!0):"body"===c["in"]&&(l=!0)}if(l&&"undefined"==typeof r){var p=e["Content-Type"];p&&0===p.indexOf("application/json")&&(r="{}")}var h=!1;if(e["Content-Type"]&&e["Content-Type"].indexOf("multipart/form-data")>=0&&(h=!0),i&&!h){var f="";for(a in s)o=s[a],"undefined"!=typeof o&&(""!==f&&(f+="&"),f+=encodeURIComponent(a)+"="+encodeURIComponent(o));r=f}else if(h&&n.useJQuery){var d=new FormData;d.type="formData";for(a in s)o=t[a],"undefined"!=typeof o&&("file"===o.type&&o.value?(delete e["Content-Type"],d.append(a,o.value)):d.append(a,o));r=d}return r},u.prototype.getModelSampleJSON=function(e,t){var n,i,a;if(t=t||{},n=e instanceof Array,a=n?e[0]:e,t[a]?i=t[a].createJSONSample():this.getInlineModel(a)&&(i=this.getInlineModel(a).createJSONSample()),i){if(i=n?[i]:i,"string"==typeof i)return i;if(r.isObject(i)){var o=i;if(i instanceof Array&&i.length>0&&(o=i[0]),o.nodeName&&"Node"==typeof o){var s=(new XMLSerializer).serializeToString(o);return this.formatXml(s)}return JSON.stringify(i,null,2)}return i}},u.prototype["do"]=function(e,t,n,i,r){return this.execute(e,t,n,i,r)},u.prototype.execute=function(e,t,n,i,o){var u,c,p,h=e||{},f={};r.isObject(t)&&(f=t,u=n,c=i),this.client&&(f.client=this.client),!f.requestInterceptor&&this.requestInterceptor&&(f.requestInterceptor=this.requestInterceptor),!f.responseInterceptor&&this.responseInterceptor&&(f.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(u=t,c=n),this.parent.usePromise?p=l.defer():(u=u||this.parent.defaultSuccessCallback||a.log,c=c||this.parent.defaultErrorCallback||a.log),"undefined"==typeof f.useJQuery&&(f.useJQuery=this.useJQuery),"undefined"==typeof f.enableCookies&&(f.enableCookies=this.enableCookies);var d=this.getMissingParams(h);if(d.length>0){var m="missing required params: "+d;return a.fail(m),this.parent.usePromise?(p.reject(m),p.promise):(c(m,o),{})}var g,y=this.getHeaderParams(h),v=this.setContentTypes(h,f),b={};for(g in y)b[g]=y[g];for(g in v)b[g]=v[g];var w=this.getBody(v,h,f),x=this.urlify(h);if(x.indexOf(".{format}")>0&&b){var A=b.Accept||b.accept;A&&A.indexOf("json")>0?x=x.replace(".{format}",".json"):A&&A.indexOf("xml")>0&&(x=x.replace(".{format}",".xml"))}var O={url:x,method:this.method.toUpperCase(),body:w,enableCookies:f.enableCookies,useJQuery:f.useJQuery,deferred:p,headers:b,clientAuthorizations:f.clientAuthorizations,on:{response:function(e){return p?(p.resolve(e),p.promise):u(e,o)},error:function(e){return p?(p.reject(e),p.promise):c(e,o)}}};return this.clientAuthorizations.apply(O,this.operation.security),f.mock===!0?O:(new s).execute(O,f)},u.prototype.setContentTypes=function(e,t){var n,r,o=this.parameters,s=e.parameterContentType||i(this.consumes,["application/json","application/yaml"]),l=t.responseContentType||i(this.produces,["application/json","application/yaml"]),u=[],c=[],p={};for(r=0;r<o.length;r++){var h=o[r];if("formData"===h["in"])"file"===h.type?u.push(h):c.push(h);else if("header"===h["in"]&&t){var f=h.name,d=t[h.name];"undefined"!=typeof t[h.name]&&(p[f]=d)}else"body"===h["in"]&&"undefined"!=typeof e[h.name]&&(n=e[h.name])}return"post"===this.method||"put"===this.method||"patch"===this.method||("delete"===this.method||"get"===this.method)&&n?(t.requestContentType&&(s=t.requestContentType),c.length>0&&(s=t.requestContentType?t.requestContentType:u.length>0?"multipart/form-data":"application/x-www-form-urlencoded")):s=null,s&&this.consumes&&-1===this.consumes.indexOf(s)&&a.log("server doesn't consume "+s+", try "+JSON.stringify(this.consumes)),this.matchesAccept(l)||a.log("server can't produce "+l),(s&&""!==n||"application/x-www-form-urlencoded"===s)&&(p["Content-Type"]=s),l&&(p.Accept=l),p},u.prototype.matchesAccept=function(e){return e&&this.produces?-1!==this.produces.indexOf(e)||-1!==this.produces.indexOf("*/*"):!0},u.prototype.asCurl=function(e,t){var n={mock:!0};if("object"==typeof t)for(var i in t)n[i]=t[i];var a=this.execute(e,n);this.clientAuthorizations.apply(a,this.operation.security);var o=[];if(o.push("-X "+this.method.toUpperCase()),"undefined"!=typeof a.headers){var s;for(s in a.headers){var l=a.headers[s];"string"==typeof l&&(l=l.replace(/\'/g,"\\u0027")),o.push("--header '"+s+": "+l+"'")}}if(a.body){var u;u=r.isObject(a.body)?JSON.stringify(a.body):a.body,o.push("-d '"+u.replace(/\'/g,"\\u0027")+"'")}return"curl "+o.join(" ")+" '"+a.url+"'"},u.prototype.encodePathCollection=function(e,t,n){var i,r="",a="";for(a="ssv"===e?"%20":"tsv"===e?"\\t":"pipes"===e?"|":",",i=0;i<n.length;i++)0===i?r=this.encodeQueryParam(n[i]):r+=a+this.encodeQueryParam(n[i]);return r},u.prototype.encodeQueryCollection=function(e,t,n){var i,r="";if("default"===e||"multi"===e)for(i=0;i<n.length;i++)i>0&&(r+="&"),r+=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[i]);else{var a="";if("csv"===e)a=",";else if("ssv"===e)a="%20";else if("tsv"===e)a="\\t";else if("pipes"===e)a="|";else if("brackets"===e)for(i=0;i<n.length;i++)0!==i&&(r+="&"),r+=this.encodeQueryParam(t)+"[]="+this.encodeQueryParam(n[i]);if(""!==a)for(i=0;i<n.length;i++)0===i?r=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[i]):r+=a+this.encodeQueryParam(n[i])}return r},u.prototype.encodeQueryParam=function(e){return encodeURIComponent(e)},u.prototype.encodePathParam=function(e){return encodeURIComponent(e)}},{"../helpers":4,"../http":5,"./model":9,"lodash-compat/lang/cloneDeep":140,"lodash-compat/lang/isEmpty":143,"lodash-compat/lang/isObject":146,"lodash-compat/lang/isUndefined":150,q:159}],11:[function(e,t,n){"use strict";var i=t.exports=function(e,t,n,i){this.description=t,this.externalDocs=n,this.name=e,this.operation=i,this.operationsArray=[],this.path=e,this.tag=e};i.prototype.sort=function(){}},{}],12:[function(e,t,n){},{}],13:[function(e,t,n){function i(){if(!s){s=!0;for(var e,t=o.length;t;){e=o,o=[];for(var n=-1;++n<t;)e[n]();t=o.length}s=!1}}function r(){}var a=t.exports={},o=[],s=!1;a.nextTick=function(e){o.push(e),s||setTimeout(i,0)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=r,a.addListener=r,a.once=r,a.off=r,a.removeListener=r,a.removeAllListeners=r,a.emit=r,a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],14:[function(e,t,n){(function(e){!function(){"use strict";function n(t){var n;return n=t instanceof e?t:new e(t.toString(),"binary"),n.toString("base64")}t.exports=n}()}).call(this,e("buffer").Buffer)},{buffer:15}],15:[function(e,t,n){function i(){return r.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(e){return this instanceof r?(this.length=0,this.parent=void 0,"number"==typeof e?a(this,e):"string"==typeof e?o(this,e,arguments.length>1?arguments[1]:"utf8"):s(this,e)):arguments.length>1?new r(e,arguments[1]):new r(e)}function a(e,t){if(e=d(e,0>t?0:0|m(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function o(e,t,n){"string"==typeof n&&""!==n||(n="utf8");var i=0|y(t,n);return e=d(e,i),e.write(t,n),e}function s(e,t){if(r.isBuffer(t))return l(e,t);if(K(t))return u(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(t.buffer instanceof ArrayBuffer)return c(e,t);if(t instanceof ArrayBuffer)return p(e,t)}return t.length?h(e,t):f(e,t)}function l(e,t){var n=0|m(t.length);return e=d(e,n),t.copy(e,0,0,n),e}function u(e,t){var n=0|m(t.length);e=d(e,n);for(var i=0;n>i;i+=1)e[i]=255&t[i];return e}function c(e,t){var n=0|m(t.length);e=d(e,n);for(var i=0;n>i;i+=1)e[i]=255&t[i];return e}function p(e,t){return r.TYPED_ARRAY_SUPPORT?(t.byteLength,e=r._augment(new Uint8Array(t))):e=c(e,new Uint8Array(t)),e}function h(e,t){var n=0|m(t.length);e=d(e,n);for(var i=0;n>i;i+=1)e[i]=255&t[i];return e}function f(e,t){var n,i=0;"Buffer"===t.type&&K(t.data)&&(n=t.data,i=0|m(n.length)),e=d(e,i);for(var r=0;i>r;r+=1)e[r]=255&n[r];return e}function d(e,t){r.TYPED_ARRAY_SUPPORT?e=r._augment(new Uint8Array(t)):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=r.poolSize>>>1;return n&&(e.parent=W),e}function m(e){if(e>=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e,t){if(!(this instanceof g))return new g(e,t);var n=new r(e,t);return delete n.parent,n}function y(e,t){"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"binary":case"raw":case"raws":return n;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return H(e).length;default:if(i)return V(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,n){var i=!1;if(t=0|t,n=void 0===n||n===1/0?this.length:0|n,e||(e="utf8"),0>t&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return I(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"binary":return E(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function b(e,t,n,i){n=Number(n)||0;var r=e.length-n;i?(i=Number(i),i>r&&(i=r)):i=r;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;i>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function w(e,t,n,i){return J(V(t,e.length-n),e,n,i)}function x(e,t,n,i){return J(q(t),e,n,i)}function A(e,t,n,i){return x(e,t,n,i)}function O(e,t,n,i){return J(H(t),e,n,i)}function j(e,t,n,i){return J(z(t,e.length-n),e,n,i)}function _(e,t,n){return 0===t&&n===e.length?Q.fromByteArray(e):Q.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var i=[],r=t;n>r;){var a=e[r],o=null,s=a>239?4:a>223?3:a>191?2:1;if(n>=r+s){var l,u,c,p;switch(s){case 1:128>a&&(o=a);break;case 2:l=e[r+1],128===(192&l)&&(p=(31&a)<<6|63&l,p>127&&(o=p));break;case 3:l=e[r+1],u=e[r+2],128===(192&l)&&128===(192&u)&&(p=(15&a)<<12|(63&l)<<6|63&u,p>2047&&(55296>p||p>57343)&&(o=p));break;case 4:l=e[r+1],u=e[r+2],c=e[r+3],128===(192&l)&&128===(192&u)&&128===(192&c)&&(p=(15&a)<<18|(63&l)<<12|(63&u)<<6|63&c,p>65535&&1114112>p&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),r+=s}return k(i)}function k(e){var t=e.length;if(X>=t)return String.fromCharCode.apply(String,e);for(var n="",i=0;t>i;)n+=String.fromCharCode.apply(String,e.slice(i,i+=X));return n}function C(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(127&e[r]);return i}function E(e,t,n){var i="";n=Math.min(e.length,n);for(var r=t;n>r;r++)i+=String.fromCharCode(e[r]);return i}function I(e,t,n){var i=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>i)&&(n=i);for(var r="",a=t;n>a;a++)r+=B(e[a]);return r}function T(e,t,n){for(var i=e.slice(t,n),r="",a=0;a<i.length;a+=2)r+=String.fromCharCode(i[a]+256*i[a+1]);return r}function $(e,t,n){if(e%1!==0||0>e)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,n,i,a,o){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>a||o>t)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function M(e,t,n,i){0>t&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-n,2);a>r;r++)e[n+r]=(t&255<<8*(i?r:1-r))>>>8*(i?r:1-r)}function P(e,t,n,i){0>t&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-n,4);a>r;r++)e[n+r]=t>>>8*(i?r:3-r)&255}function L(e,t,n,i,r,a){if(t>r||a>t)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function D(e,t,n,i,r){return r||L(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Y.write(e,t,n,i,23,4),n+4}function R(e,t,n,i,r){return r||L(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Y.write(e,t,n,i,52,8),n+8}function N(e){if(e=F(e).replace(Z,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function F(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function B(e){return 16>e?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,i=e.length,r=null,a=[],o=0;i>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=r-55296<<10|n-56320|65536}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(1114112>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function q(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t}function z(e,t){for(var n,i,r,a=[],o=0;o<e.length&&!((t-=2)<0);o++)n=e.charCodeAt(o),i=n>>8,r=n%256,a.push(r),a.push(i);return a}function H(e){return Q.toByteArray(N(e))}function J(e,t,n,i){for(var r=0;i>r&&!(r+n>=t.length||r>=e.length);r++)t[r+n]=e[r];return r}var Q=e("base64-js"),Y=e("ieee754"),K=e("is-array");n.Buffer=r,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var W={};r.TYPED_ARRAY_SUPPORT=function(){function e(){}try{var t=new Uint8Array(1);return t.foo=function(){return 42},t.constructor=e,42===t.foo()&&t.constructor===e&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(n){return!1}}(),r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);o>a&&e[a]===t[a];)++a;return a!==o&&(n=e[a],i=t[a]),i>n?-1:n>i?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!K(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new r(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;n++)t+=e[n].length;var i=new r(t),a=0;for(n=0;n<e.length;n++){var o=e[n];o.copy(i,a),a+=o.length}return i},r.byteLength=y,r.prototype.length=void 0,r.prototype.parent=void 0,r.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):v.apply(this,arguments)},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},r.prototype.compare=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:r.compare(this,e)},r.prototype.indexOf=function(e,t){function n(e,t,n){for(var i=-1,r=0;n+r<e.length;r++)if(e[n+r]===t[-1===i?0:r-i]){if(-1===i&&(i=r),r-i+1===t.length)return n+i}else i=-1;return-1}if(t>2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(r.isBuffer(e))return n(this,e,t);if("number"==typeof e)return r.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.write=function(e,t,n,i){if(void 0===t)i="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)i=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===i&&(i="utf8")):(i=n,n=void 0);else{var r=i;i=t,t=0|n,n=r}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":return x(this,e,t,n);case"binary":return A(this,e,t,n);case"base64":return O(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var X=4096;r.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var i;if(r.TYPED_ARRAY_SUPPORT)i=r._augment(this.subarray(e,t));else{var a=t-e;i=new r(a,void 0);for(var o=0;a>o;o++)i[o]=this[o+e]}return i.length&&(i.parent=this.parent||this),i},r.prototype.readUIntLE=function(e,t,n){e=0|e,t=0|t,n||$(e,t,this.length);for(var i=this[e],r=1,a=0;++a<t&&(r*=256);)i+=this[e+a]*r;return i},r.prototype.readUIntBE=function(e,t,n){e=0|e,t=0|t,n||$(e,t,this.length);for(var i=this[e+--t],r=1;t>0&&(r*=256);)i+=this[e+--t]*r;return i},r.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||$(e,t,this.length);for(var i=this[e],r=1,a=0;++a<t&&(r*=256);)i+=this[e+a]*r;return r*=128,i>=r&&(i-=Math.pow(2,8*t)),i},r.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||$(e,t,this.length);for(var i=t,r=1,a=this[e+--i];i>0&&(r*=256);)a+=this[e+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},r.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),Y.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),Y.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),Y.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),Y.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,i){e=+e,t=0|t,n=0|n,i||U(this,e,t,n,Math.pow(2,8*n),0);var r=1,a=0;for(this[t]=255&e;++a<n&&(r*=256);)this[t+a]=e/r&255;return t+n},r.prototype.writeUIntBE=function(e,t,n,i){e=+e,t=0|t,n=0|n,i||U(this,e,t,n,Math.pow(2,8*n),0);var r=n-1,a=1;for(this[t+r]=255&e;--r>=0&&(a*=256);)this[t+r]=e/a&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):M(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):P(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):P(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);U(this,e,t,n,r-1,-r)}var a=0,o=1,s=0>e?1:0;for(this[t]=255&e;++a<n&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);U(this,e,t,n,r-1,-r)}var a=n-1,o=1,s=0>e?1:0;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):M(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):M(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):P(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||U(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):P(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return R(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return R(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t<i-n&&(i=e.length-t+n);var a,o=i-n;if(this===e&&t>n&&i>t)for(a=o-1;a>=0;a--)e[a+t]=this[a+n];else if(1e3>o||!r.TYPED_ARRAY_SUPPORT)for(a=0;o>a;a++)e[a+t]=this[a+n];else e._set(this.subarray(n,n+o),t);return o},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var i;if("number"==typeof e)for(i=t;n>i;i++)this[i]=e;else{var r=V(e.toString()),a=r.length;for(i=t;n>i;i++)this[i]=r[i%a]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var G=r.prototype;r._augment=function(e){return e.constructor=r,e._isBuffer=!0,e._set=e.set,e.get=G.get,e.set=G.set,e.write=G.write,e.toString=G.toString,e.toLocaleString=G.toString,e.toJSON=G.toJSON,e.equals=G.equals,e.compare=G.compare,e.indexOf=G.indexOf,e.copy=G.copy,e.slice=G.slice,e.readUIntLE=G.readUIntLE,e.readUIntBE=G.readUIntBE,e.readUInt8=G.readUInt8,e.readUInt16LE=G.readUInt16LE,e.readUInt16BE=G.readUInt16BE,e.readUInt32LE=G.readUInt32LE,e.readUInt32BE=G.readUInt32BE,e.readIntLE=G.readIntLE,e.readIntBE=G.readIntBE,e.readInt8=G.readInt8,e.readInt16LE=G.readInt16LE,e.readInt16BE=G.readInt16BE,e.readInt32LE=G.readInt32LE,e.readInt32BE=G.readInt32BE,e.readFloatLE=G.readFloatLE,e.readFloatBE=G.readFloatBE,e.readDoubleLE=G.readDoubleLE,e.readDoubleBE=G.readDoubleBE,e.writeUInt8=G.writeUInt8,e.writeUIntLE=G.writeUIntLE,e.writeUIntBE=G.writeUIntBE,e.writeUInt16LE=G.writeUInt16LE,e.writeUInt16BE=G.writeUInt16BE,e.writeUInt32LE=G.writeUInt32LE,e.writeUInt32BE=G.writeUInt32BE,e.writeIntLE=G.writeIntLE,e.writeIntBE=G.writeIntBE,e.writeInt8=G.writeInt8,e.writeInt16LE=G.writeInt16LE,e.writeInt16BE=G.writeInt16BE,e.writeInt32LE=G.writeInt32LE,e.writeInt32BE=G.writeInt32BE,e.writeFloatLE=G.writeFloatLE,e.writeFloatBE=G.writeFloatBE,e.writeDoubleLE=G.writeDoubleLE,e.writeDoubleBE=G.writeDoubleBE,e.fill=G.fill,e.inspect=G.inspect,e.toArrayBuffer=G.toArrayBuffer,e};var Z=/[^+\/0-9A-Za-z-_]/g},{"base64-js":16,ieee754:17,"is-array":18}],16:[function(e,t,n){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\r
+!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o||t===p?62:t===s||t===h?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var i,r,o,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new a(3*e.length/4-l),o=l>0?e.length-4:e.length;var p=0;for(i=0,r=0;o>i;i+=4,r+=3)s=t(e.charAt(i))<<18|t(e.charAt(i+1))<<12|t(e.charAt(i+2))<<6|t(e.charAt(i+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(i))<<2|t(e.charAt(i+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(i))<<10|t(e.charAt(i+1))<<4|t(e.charAt(i+2))>>2,n(s>>8&255),n(255&s)),u}function r(e){function t(e){return i.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var r,a,o,s=e.length%3,l="";for(r=0,o=e.length-s;o>r;r+=3)a=(e[r]<<16)+(e[r+1]<<8)+e[r+2],l+=n(a);switch(s){case 1:a=e[e.length-1],l+=t(a>>2),l+=t(a<<4&63),l+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],l+=t(a>>10),l+=t(a>>4&63),l+=t(a<<2&63),l+="="}return l}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),h="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=r}("undefined"==typeof n?this.base64js={}:n)},{}],17:[function(e,t,n){n.read=function(e,t,n,i,r){var a,o,s=8*r-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=n?r-1:0,h=n?-1:1,f=e[t+p];for(p+=h,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=i;c>0;o=256*o+e[t+p],p+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:(f?-1:1)*(1/0);o+=Math.pow(2,i),a-=u}return(f?-1:1)*o*Math.pow(2,a-i)},n.write=function(e,t,n,i,r,a){var o,s,l,u=8*a-r-1,c=(1<<u)-1,p=c>>1,h=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:a-1,d=i?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?h/l:h*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,r),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,r),o=0));r>=8;e[n+f]=255&s,f+=d,s/=256,r-=8);for(o=o<<r|s,u+=r;u>0;e[n+f]=255&o,f+=d,o/=256,u-=8);e[n+f-d]|=128*m}},{}],18:[function(e,t,n){var i=Array.isArray,r=Object.prototype.toString;t.exports=i||function(e){return!!e&&"[object Array]"==r.call(e)}},{}],19:[function(e,t,n){function i(e){return e?r(e):void 0}function r(e){for(var t in i.prototype)e[t]=i.prototype[t];return e}t.exports=i,i.prototype.on=i.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},i.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},i.prototype.off=i.prototype.removeListener=i.prototype.removeAllListeners=i.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var i,r=0;r<n.length;r++)if(i=n[r],i===t||i.fn===t){n.splice(r,1);break}return this},i.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks["$"+e];if(n){n=n.slice(0);for(var i=0,r=n.length;r>i;++i)n[i].apply(this,t)}return this},i.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},i.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],20:[function(e,t,n){!function(){"use strict";function e(t,n,i,r){return this instanceof e?(this.domain=t||void 0,this.path=n||"/",this.secure=!!i,this.script=!!r,this):new e(t,n,i,r)}function t(e,n,i){return e instanceof t?e:this instanceof t?(this.name=null,this.value=null,this.expiration_date=1/0,this.path=String(i||"/"),this.explicit_path=!1,this.domain=n||null,this.explicit_domain=!1,this.secure=!1,this.noscript=!1,e&&this.parse(e,n,i),this):new t(e,n,i)}function i(){var e,n,r;return this instanceof i?(e=Object.create(null),this.setCookie=function(i,a,o){var s,l;if(i=new t(i,a,o),s=i.expiration_date<=Date.now(),void 0!==e[i.name]){for(n=e[i.name],l=0;l<n.length;l+=1)if(r=n[l],r.collidesWith(i))return s?(n.splice(l,1),0===n.length&&delete e[i.name],!1):(n[l]=i,i);return s?!1:(n.push(i),i)}return s?!1:(e[i.name]=[i],e[i.name])},this.getCookie=function(t,i){var r,a;if(n=e[t])for(a=0;a<n.length;a+=1)if(r=n[a],r.expiration_date<=Date.now())0===n.length&&delete e[r.name];else if(r.matches(i))return r},this.getCookies=function(t){var n,i,r=[];for(n in e)i=this.getCookie(n,t),i&&r.push(i);return r.toString=function(){return r.join(":")},r.toValueString=function(){return r.map(function(e){return e.toValueString()}).join(";")},r},this):new i}n.CookieAccessInfo=e,n.Cookie=t,t.prototype.toString=function(){var e=[this.name+"="+this.value];return this.expiration_date!==1/0&&e.push("expires="+new Date(this.expiration_date).toGMTString()),this.domain&&e.push("domain="+this.domain),this.path&&e.push("path="+this.path),this.secure&&e.push("secure"),this.noscript&&e.push("httponly"),e.join("; ")},t.prototype.toValueString=function(){return this.name+"="+this.value};var r=/[:](?=\s*[a-zA-Z0-9_\-]+\s*[=])/g;t.prototype.parse=function(e,n,i){if(this instanceof t){var r,a=e.split(";").filter(function(e){return!!e}),o=a[0].match(/([^=]+)=([\s\S]*)/),s=o[1],l=o[2];for(this.name=s,this.value=l,r=1;r<a.length;r+=1)switch(o=a[r].match(/([^=]+)(?:=([\s\S]*))?/),s=o[1].trim().toLowerCase(),l=o[2],s){case"httponly":this.noscript=!0;break;case"expires":this.expiration_date=l?Number(Date.parse(l)):1/0;break;case"path":this.path=l?l.trim():"",this.explicit_path=!0;break;case"domain":this.domain=l?l.trim():"",this.explicit_domain=!!this.domain;break;case"secure":this.secure=!0}return this.explicit_path||(this.path=i||"/"),this.explicit_domain||(this.domain=n),this}return(new t).parse(e,n,i)},t.prototype.matches=function(e){return!(this.noscript&&e.script||this.secure&&!e.secure)&&this.collidesWith(e)},t.prototype.collidesWith=function(e){if(this.path&&!e.path||this.domain&&!e.domain)return!1;if(this.path&&0!==e.path.indexOf(this.path))return!1;if(this.explicit_path&&0!==e.path.indexOf(this.path))return!1;var t=e.domain&&e.domain.replace(/^[\.]/,""),n=this.domain&&this.domain.replace(/^[\.]/,"");if(n===t)return!0;if(n){if(!this.explicit_domain)return!1;var i=t.indexOf(n);return-1!==i&&i===t.length-n.length}return!0},n.CookieJar=i,i.prototype.setCookies=function(e,n,i){e=Array.isArray(e)?e:e.split(r);var a,o,s=[];for(e=e.map(function(e){return new t(e,n,i)}),a=0;a<e.length;a+=1)o=e[a],this.setCookie(o,n,i)&&s.push(o);return s}}()},{}],21:[function(e,t,n){"use strict";var i=e("./lib/js-yaml.js");t.exports=i},{"./lib/js-yaml.js":22}],22:[function(e,t,n){"use strict";function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}var r=e("./js-yaml/loader"),a=e("./js-yaml/dumper");t.exports.Type=e("./js-yaml/type"),t.exports.Schema=e("./js-yaml/schema"),t.exports.FAILSAFE_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.JSON_SCHEMA=e("./js-yaml/schema/json"),t.exports.CORE_SCHEMA=e("./js-yaml/schema/core"),t.exports.DEFAULT_SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_FULL_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.load=r.load,t.exports.loadAll=r.loadAll,t.exports.safeLoad=r.safeLoad,t.exports.safeLoadAll=r.safeLoadAll,t.exports.dump=a.dump,t.exports.safeDump=a.safeDump,t.exports.YAMLException=e("./js-yaml/exception"),t.exports.MINIMAL_SCHEMA=e("./js-yaml/schema/failsafe"),t.exports.SAFE_SCHEMA=e("./js-yaml/schema/default_safe"),t.exports.DEFAULT_SCHEMA=e("./js-yaml/schema/default_full"),t.exports.scan=i("scan"),t.exports.parse=i("parse"),t.exports.compose=i("compose"),t.exports.addConstructor=i("addConstructor")},{"./js-yaml/dumper":24,"./js-yaml/exception":25,"./js-yaml/loader":26,"./js-yaml/schema":28,"./js-yaml/schema/core":29,"./js-yaml/schema/default_full":30,"./js-yaml/schema/default_safe":31,"./js-yaml/schema/failsafe":32,"./js-yaml/schema/json":33,"./js-yaml/type":34}],23:[function(e,t,n){"use strict";function i(e){return"undefined"==typeof e||null===e}function r(e){return"object"==typeof e&&null!==e}function a(e){return Array.isArray(e)?e:i(e)?[]:[e]}function o(e,t){var n,i,r,a;if(t)for(a=Object.keys(t),n=0,i=a.length;i>n;n+=1)r=a[n],e[r]=t[r];return e}function s(e,t){var n,i="";for(n=0;t>n;n+=1)i+=e;return i}function l(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.exports.isNothing=i,t.exports.isObject=r,t.exports.toArray=a,t.exports.repeat=s,t.exports.isNegativeZero=l,t.exports.extend=o},{}],24:[function(e,t,n){"use strict";function i(e,t){var n,i,r,a,o,s,l;if(null===t)return{};for(n={},i=Object.keys(t),r=0,a=i.length;a>r;r+=1)o=i[r],s=String(t[o]),"!!"===o.slice(0,2)&&(o="tag:yaml.org,2002:"+o.slice(2)),l=e.compiledTypeMap[o],l&&I.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[o]=s;return n}function r(e){var t,n,i;if(t=e.toString(16).toUpperCase(),255>=e)n="x",i=2;else if(65535>=e)n="u",i=4;else{if(!(4294967295>=e))throw new S("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+_.repeat("0",i-t.length)+t}function a(e){this.schema=e.schema||k,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=_.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=i(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var n,i=_.repeat(" ",t),r=0,a=-1,o="",s=e.length;s>r;)a=e.indexOf("\n",r),-1===a?(n=e.slice(r),r=s):(n=e.slice(r,a+1),r=a+1),n.length&&"\n"!==n&&(o+=i),o+=n;return o}function s(e,t){return"\n"+_.repeat(" ",e.indent*t)}function l(e,t){var n,i,r;for(n=0,i=e.implicitTypes.length;i>n;n+=1)if(r=e.implicitTypes[n],r.resolve(t))return!0;return!1}function u(e){this.source=e,this.result="",this.checkpoint=0}function c(e,t,n,i){var r,a,s,c,h,m,g,y,v,b,w,x,A,O,j,_,S,k,C,E,I;if(0===t.length)return void(e.dump="''");if(-1!==te.indexOf(t))return void(e.dump="'"+t+"'");for(r=!0,a=t.length?t.charCodeAt(0):0,s=M===a||M===t.charCodeAt(t.length-1),q!==a&&J!==a&&Q!==a&&W!==a||(r=!1),s||e.flowLevel>-1&&e.flowLevel<=n?(s&&(r=!1),c=!1,h=!1):(c=!i,h=!i),m=!0,g=new u(t),y=!1,v=0,b=0,w=e.indent*n,x=e.lineWidth,-1===x&&(x=9007199254740991),40>w?x-=w:x=40,O=0;O<t.length;O++){if(A=t.charCodeAt(O),r){if(f(A))continue;r=!1}m&&A===F&&(m=!1),j=ee[A],_=d(A),(j||_)&&(A!==$&&A!==L&&A!==F?(c=!1,h=!1):A===$&&(y=!0,m=!1,O>0&&(S=t.charCodeAt(O-1),S===M&&(h=!1,c=!1)),c&&(k=O-v,v=O,k>b&&(b=k))),A!==L&&(m=!1),g.takeUpTo(O),g.escapeChar())}if(r&&l(e,t)&&(r=!1),C="",(c||h)&&(E=0,t.charCodeAt(t.length-1)===$&&(E+=1,t.charCodeAt(t.length-2)===$&&(E+=1)),0===E?C="-":2===E&&(C="+")),(h&&x>b||null!==e.tag)&&(c=!1),y||(h=!1),r)e.dump=t;else if(m)e.dump="'"+t+"'";else if(c)I=p(t,x),e.dump=">"+C+"\n"+o(I,w);else if(h)C||(t=t.replace(/\n$/,"")),e.dump="|"+C+"\n"+o(t,w);else{if(!g)throw new Error("Failed to dump scalar value");g.finish(),e.dump='"'+g.result+'"'}}function p(e,t){var n,i="",r=0,a=e.length,o=/\n+$/.exec(e);for(o&&(a=o.index+1);a>r;)n=e.indexOf("\n",r),n>a||-1===n?(i&&(i+="\n\n"),i+=h(e.slice(r,a),t),r=a):(i&&(i+="\n\n"),i+=h(e.slice(r,n),t),r=n+1);return o&&"\n"!==o[0]&&(i+=o[0]),i}function h(e,t){if(""===e)return e;for(var n,i,r,a=/[^\s] [^\s]/g,o="",s=0,l=0,u=a.exec(e);u;)n=u.index,n-l>t&&(i=s!==l?s:n,o&&(o+="\n"),r=e.slice(l,i),o+=r,l=i+1),s=n+1,u=a.exec(e);return o&&(o+="\n"),o+=l!==s&&e.length-l>t?e.slice(l,s)+"\n"+e.slice(s+1):e.slice(l)}function f(e){return T!==e&&$!==e&&U!==e&&V!==e&&Y!==e&&K!==e&&X!==e&&Z!==e&&D!==e&&N!==e&&B!==e&&P!==e&&G!==e&&H!==e&&F!==e&&L!==e&&R!==e&&z!==e&&!ee[e]&&!d(e)}function d(e){return!(e>=32&&126>=e||133===e||e>=160&&55295>=e||e>=57344&&65533>=e||e>=65536&&1114111>=e)}function m(e,t,n){var i,r,a="",o=e.tag;for(i=0,r=n.length;r>i;i+=1)w(e,t,n[i],!1,!1)&&(0!==i&&(a+=", "),a+=e.dump);e.tag=o,e.dump="["+a+"]"}function g(e,t,n,i){var r,a,o="",l=e.tag;for(r=0,a=n.length;a>r;r+=1)w(e,t+1,n[r],!0,!0)&&(i&&0===r||(o+=s(e,t)),o+="- "+e.dump);e.tag=l,e.dump=o||"[]"}function y(e,t,n){var i,r,a,o,s,l="",u=e.tag,c=Object.keys(n);for(i=0,r=c.length;r>i;i+=1)s="",0!==i&&(s+=", "),a=c[i],o=n[a],w(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+": ",w(e,t,o,!1,!1)&&(s+=e.dump,l+=s));e.tag=u,e.dump="{"+l+"}"}function v(e,t,n,i){var r,a,o,l,u,c,p="",h=e.tag,f=Object.keys(n);if(e.sortKeys===!0)f.sort();else if("function"==typeof e.sortKeys)f.sort(e.sortKeys);else if(e.sortKeys)throw new S("sortKeys must be a boolean or a function");for(r=0,a=f.length;a>r;r+=1)c="",i&&0===r||(c+=s(e,t)),o=f[r],l=n[o],w(e,t+1,o,!0,!0,!0)&&(u=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024,u&&(c+=e.dump&&$===e.dump.charCodeAt(0)?"?":"? "),c+=e.dump,u&&(c+=s(e,t)),w(e,t+1,l,!0,u)&&(c+=e.dump&&$===e.dump.charCodeAt(0)?":":": ",c+=e.dump,p+=c));e.tag=h,e.dump=p||"{}"}function b(e,t,n){var i,r,a,o,s,l;for(r=n?e.explicitTypes:e.implicitTypes,a=0,o=r.length;o>a;a+=1)if(s=r[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||"object"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:"?",s.represent){if(l=e.styleMap[s.tag]||s.defaultStyle,"[object Function]"===E.call(s.represent))i=s.represent(t,l);else{if(!I.call(s.represent,l))throw new S("!<"+s.tag+'> tag resolver accepts not "'+l+'" style');i=s.represent[l](t,l)}e.dump=i}return!0}return!1}function w(e,t,n,i,r,a){e.tag=null,e.dump=n,b(e,n,!1)||b(e,n,!0);var o=E.call(e.dump);i&&(i=e.flowLevel<0||e.flowLevel>t);var s,l,u="[object Object]"===o||"[object Array]"===o;if(u&&(s=e.duplicates.indexOf(n),l=-1!==s),(null!==e.tag&&"?"!==e.tag||l||2!==e.indent&&t>0)&&(r=!1),l&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&l&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===o)i&&0!==Object.keys(e.dump).length?(v(e,t,e.dump,r),l&&(e.dump="&ref_"+s+e.dump)):(y(e,t,e.dump),l&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===o)i&&0!==e.dump.length?(g(e,t,e.dump,r),l&&(e.dump="&ref_"+s+e.dump)):(m(e,t,e.dump),l&&(e.dump="&ref_"+s+" "+e.dump));else{if("[object String]"!==o){if(e.skipInvalid)return!1;throw new S("unacceptable kind of an object to dump "+o)}"?"!==e.tag&&c(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function x(e,t){var n,i,r=[],a=[];for(A(e,r,a),n=0,i=a.length;i>n;n+=1)t.duplicates.push(r[a[n]]);t.usedDuplicates=new Array(i)}function A(e,t,n){var i,r,a;if(null!==e&&"object"==typeof e)if(r=t.indexOf(e),-1!==r)-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,a=e.length;a>r;r+=1)A(e[r],t,n);else for(i=Object.keys(e),r=0,a=i.length;a>r;r+=1)A(e[i[r]],t,n)}function O(e,t){t=t||{};var n=new a(t);return n.noRefs||x(e,n),w(n,0,e,!0,!0)?n.dump+"\n":""}function j(e,t){return O(e,_.extend({schema:C},t))}var _=e("./common"),S=e("./exception"),k=e("./schema/default_full"),C=e("./schema/default_safe"),E=Object.prototype.toString,I=Object.prototype.hasOwnProperty,T=9,$=10,U=13,M=32,P=33,L=34,D=35,R=37,N=38,F=39,B=42,V=44,q=45,z=58,H=62,J=63,Q=64,Y=91,K=93,W=96,X=123,G=124,Z=125,ee={};ee[0]="\\0",ee[7]="\\a",ee[8]="\\b",ee[9]="\\t",ee[10]="\\n",ee[11]="\\v",ee[12]="\\f",ee[13]="\\r",ee[27]="\\e",ee[34]='\\"',ee[92]="\\\\",ee[133]="\\N",ee[160]="\\_",ee[8232]="\\L",ee[8233]="\\P";var te=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];u.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error("position should be > checkpoint"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},u.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||r(e),this.result+=t,this.checkpoint+=1,this},u.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.exports.dump=O,t.exports.safeDump=j},{"./common":23,"./exception":25,"./schema/default_full":30,"./schema/default_safe":31}],25:[function(e,t,n){"use strict";function i(e,t){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():"")}i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},t.exports=i},{}],26:[function(e,t,n){"use strict";function i(e){return 10===e||13===e}function r(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return e>=48&&57>=e?e-48:(t=32|e,t>=97&&102>=t?t-97+10:-1)}function l(e){return 120===e?2:117===e?4:85===e?8:0}function u(e){return e>=48&&57>=e?e-48:-1}function c(e){return 48===e?"\x00":97===e?"\a":98===e?"\b":116===e?"     ":9===e?"       ":110===e?"\n":118===e?"\x0B":102===e?"\f":114===e?"\r":101===e?"\e":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"\85":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function p(e){return 65535>=e?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function h(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||z,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function f(e,t){return new B(t,new V(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function d(e,t){throw f(e,t)}function m(e,t){e.onWarning&&e.onWarning.call(null,f(e,t))}function g(e,t,n,i){var r,a,o,s;if(n>t){if(s=e.input.slice(t,n),i)for(r=0,a=s.length;a>r;r+=1)o=s.charCodeAt(r),9===o||o>=32&&1114111>=o||d(e,"expected valid JSON character");else Z.test(s)&&d(e,"the stream contains non-printable characters");e.result+=s}}function y(e,t,n,i){var r,a,o,s;for(F.isObject(n)||d(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(n),o=0,s=r.length;s>o;o+=1)a=r[o],H.call(t,a)||(t[a]=n[a],i[a]=!0)}function v(e,t,n,i,r,a){var o,s;if(r=String(r),null===t&&(t={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(o=0,s=a.length;s>o;o+=1)y(e,t,a[o],n);else y(e,t,a,n);else e.json||H.call(n,r)||!H.call(t,r)||d(e,"duplicated mapping key"),t[r]=a,delete n[r];return t}function b(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function w(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;r(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do o=e.input.charCodeAt(++e.position);while(10!==o&&13!==o&&0!==o);if(!i(o))break;for(b(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==a&&e.lineIndent<n&&m(e,"deficient indentation"),a}function x(e){var t,n=e.position;return t=e.input.charCodeAt(n),(45===t||46===t)&&t===e.input.charCodeAt(n+1)&&t===e.input.charCodeAt(n+2)&&(n+=3,t=e.input.charCodeAt(n),0===t||a(t))}function A(e,t){1===t?e.result+=" ":t>1&&(e.result+=F.repeat("\n",t-1))}function O(e,t,n){var s,l,u,c,p,h,f,d,m,y=e.kind,v=e.result;if(m=e.input.charCodeAt(e.position),a(m)||o(m)||35===m||38===m||42===m||33===m||124===m||62===m||39===m||34===m||37===m||64===m||96===m)return!1;if((63===m||45===m)&&(l=e.input.charCodeAt(e.position+1),a(l)||n&&o(l)))return!1;for(e.kind="scalar",e.result="",u=c=e.position,p=!1;0!==m;){if(58===m){if(l=e.input.charCodeAt(e.position+1),a(l)||n&&o(l))break}else if(35===m){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&x(e)||n&&o(m))break;if(i(m)){if(h=e.line,f=e.lineStart,d=e.lineIndent,w(e,!1,-1),e.lineIndent>=t){p=!0,m=e.input.charCodeAt(e.position);continue}e.position=c,e.line=h,e.lineStart=f,e.lineIndent=d;break}}p&&(g(e,u,c,!1),A(e,e.line-h),u=c=e.position,p=!1),r(m)||(c=e.position+1),m=e.input.charCodeAt(++e.position)}return g(e,u,c,!1),e.result?!0:(e.kind=y,e.result=v,!1)}function j(e,t){var n,r,a;if(n=e.input.charCodeAt(e.position),39!==n)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(g(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),39!==n)return!0;r=a=e.position,e.position++}else i(n)?(g(e,r,a,!0),A(e,w(e,!1,t)),r=a=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,a=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function _(e,t){var n,r,a,o,u,c;if(c=e.input.charCodeAt(e.position),34!==c)return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(c=e.input.charCodeAt(e.position));){if(34===c)return g(e,n,e.position,!0),e.position++,!0;if(92===c){if(g(e,n,e.position,!0),c=e.input.charCodeAt(++e.position),i(c))w(e,!1,t);else if(256>c&&re[c])e.result+=ae[c],e.position++;else if((u=l(c))>0){for(a=u,o=0;a>0;a--)c=e.input.charCodeAt(++e.position),(u=s(c))>=0?o=(o<<4)+u:d(e,"expected hexadecimal character");e.result+=p(o),e.position++}else d(e,"unknown escape sequence");n=r=e.position}else i(c)?(g(e,n,r,!0),A(e,w(e,!1,t)),n=r=e.position):e.position===e.lineStart&&x(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function S(e,t){var n,i,r,o,s,l,u,c,p,h,f,m=!0,g=e.tag,y=e.anchor,b={};if(f=e.input.charCodeAt(e.position),91===f)o=93,u=!1,i=[];else{if(123!==f)return!1;o=125,u=!0,i={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=i),f=e.input.charCodeAt(++e.position);0!==f;){if(w(e,!0,t),f=e.input.charCodeAt(e.position),f===o)return e.position++,e.tag=g,e.anchor=y,e.kind=u?"mapping":"sequence",e.result=i,!0;m||d(e,"missed comma between flow collection entries"),p=c=h=null,s=l=!1,63===f&&(r=e.input.charCodeAt(e.position+1),a(r)&&(s=l=!0,e.position++,w(e,!0,t))),n=e.line,U(e,t,J,!1,!0),p=e.tag,c=e.result,w(e,!0,t),f=e.input.charCodeAt(e.position),!l&&e.line!==n||58!==f||(s=!0,f=e.input.charCodeAt(++e.position),w(e,!0,t),U(e,t,J,!1,!0),h=e.result),u?v(e,i,b,p,c,h):s?i.push(v(e,null,b,p,c,h)):i.push(c),w(e,!0,t),f=e.input.charCodeAt(e.position),44===f?(m=!0,f=e.input.charCodeAt(++e.position)):m=!1}d(e,"unexpected end of the stream within a flow collection")}function k(e,t){var n,a,o,s,l=W,c=!1,p=t,h=0,f=!1;if(s=e.input.charCodeAt(e.position),124===s)a=!1;else{if(62!==s)return!1;a=!0}for(e.kind="scalar",e.result="";0!==s;)if(s=e.input.charCodeAt(++e.position),43===s||45===s)W===l?l=43===s?G:X:d(e,"repeat of a chomping mode identifier");else{if(!((o=u(s))>=0))break;0===o?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?d(e,"repeat of an indentation width identifier"):(p=t+o-1,c=!0)}if(r(s)){do s=e.input.charCodeAt(++e.position);while(r(s));if(35===s)do s=e.input.charCodeAt(++e.position);while(!i(s)&&0!==s)}for(;0!==s;){for(b(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!c||e.lineIndent<p)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!c&&e.lineIndent>p&&(p=e.lineIndent),i(s))h++;else{if(e.lineIndent<p){l===G?e.result+=F.repeat("\n",h):l===W&&c&&(e.result+="\n");break}for(a?r(s)?(f=!0,e.result+=F.repeat("\n",h+1)):f?(f=!1,e.result+=F.repeat("\n",h+1)):0===h?c&&(e.result+=" "):e.result+=F.repeat("\n",h):c?e.result+=F.repeat("\n",h+1):e.result+=F.repeat("\n",h),c=!0,h=0,n=e.position;!i(s)&&0!==s;)s=e.input.charCodeAt(++e.position);g(e,n,e.position,!1)}}return!0}function C(e,t){var n,i,r,o=e.tag,s=e.anchor,l=[],u=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=l),r=e.input.charCodeAt(e.position);0!==r&&45===r&&(i=e.input.charCodeAt(e.position+1),a(i));)if(u=!0,e.position++,w(e,!0,-1)&&e.lineIndent<=t)l.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,U(e,t,Y,!1,!0),l.push(e.result),w(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return u?(e.tag=o,e.anchor=s,e.kind="sequence",e.result=l,!0):!1}function E(e,t,n){var i,o,s,l,u=e.tag,c=e.anchor,p={},h={},f=null,m=null,g=null,y=!1,b=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=p),l=e.input.charCodeAt(e.position);0!==l;){if(i=e.input.charCodeAt(e.position+1),s=e.line,63!==l&&58!==l||!a(i)){if(!U(e,n,Q,!1,!0))break;if(e.line===s){for(l=e.input.charCodeAt(e.position);r(l);)l=e.input.charCodeAt(++e.position);if(58===l)l=e.input.charCodeAt(++e.position),a(l)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),y&&(v(e,p,h,f,m,null),f=m=g=null),b=!0,y=!1,o=!1,f=e.tag,m=e.result;else{if(!b)return e.tag=u,e.anchor=c,!0;d(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!b)return e.tag=u,e.anchor=c,!0;d(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===l?(y&&(v(e,p,h,f,m,null),f=m=g=null),b=!0,y=!0,o=!0):y?(y=!1,o=!0):d(e,"incomplete explicit mapping pair; a key node is missed"),e.position+=1,l=i;if((e.line===s||e.lineIndent>t)&&(U(e,t,K,!0,o)&&(y?m=e.result:g=e.result),y||(v(e,p,h,f,m,g),f=m=g=null),w(e,!0,-1),l=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==l)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return y&&v(e,p,h,f,m,null),b&&(e.tag=u,e.anchor=c,e.kind="mapping",e.result=p),b}function I(e){var t,n,i,r,o=!1,s=!1;if(r=e.input.charCodeAt(e.position),33!==r)return!1;if(null!==e.tag&&d(e,"duplication of a tag property"),r=e.input.charCodeAt(++e.position),60===r?(o=!0,r=e.input.charCodeAt(++e.position)):33===r?(s=!0,n="!!",r=e.input.charCodeAt(++e.position)):n="!",t=e.position,o){do r=e.input.charCodeAt(++e.position);while(0!==r&&62!==r);e.position<e.length?(i=e.input.slice(t,e.position),r=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==r&&!a(r);)33===r&&(s?d(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),ne.test(n)||d(e,"named tag handle cannot contain such characters"),s=!0,t=e.position+1)),r=e.input.charCodeAt(++e.position);i=e.input.slice(t,e.position),te.test(i)&&d(e,"tag suffix cannot contain flow indicator characters")}return i&&!ie.test(i)&&d(e,"tag name cannot contain such characters: "+i),o?e.tag=i:H.call(e.tagMap,n)?e.tag=e.tagMap[n]+i:"!"===n?e.tag="!"+i:"!!"===n?e.tag="tag:yaml.org,2002:"+i:d(e,'undeclared tag handle "'+n+'"'),!0}function T(e){var t,n;if(n=e.input.charCodeAt(e.position),38!==n)return!1;for(null!==e.anchor&&d(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!a(n)&&!o(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function $(e){var t,n,i;if(i=e.input.charCodeAt(e.position),42!==i)return!1;for(i=e.input.charCodeAt(++e.position),t=e.position;0!==i&&!a(i)&&!o(i);)i=e.input.charCodeAt(++e.position);return e.position===t&&d(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||d(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],w(e,!0,-1),!0}function U(e,t,n,i,r){var a,o,s,l,u,c,p,h,f=1,m=!1,g=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=K===n||Y===n,i&&w(e,!0,-1)&&(m=!0,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)),1===f)for(;I(e)||T(e);)w(e,!0,-1)?(m=!0,s=a,e.lineIndent>t?f=1:e.lineIndent===t?f=0:e.lineIndent<t&&(f=-1)):s=!1;if(s&&(s=m||r),1!==f&&K!==n||(p=J===n||Q===n?t:t+1,h=e.position-e.lineStart,1===f?s&&(C(e,h)||E(e,h,p))||S(e,p)?g=!0:(o&&k(e,p)||j(e,p)||_(e,p)?g=!0:$(e)?(g=!0,null===e.tag&&null===e.anchor||d(e,"alias node should not have any properties")):O(e,p,J===n)&&(g=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===f&&(g=s&&C(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(l=0,u=e.implicitTypes.length;u>l;l+=1)if(c=e.implicitTypes[l],c.resolve(e.result)){e.result=c.construct(e.result),e.tag=c.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else H.call(e.typeMap,e.tag)?(c=e.typeMap[e.tag],null!==e.result&&c.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+c.kind+'", not "'+e.kind+'"'),c.resolve(e.result)?(e.result=c.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):d(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||g}function M(e){var t,n,o,s,l=e.position,u=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(w(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(u=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&d(e,"directive name must not be less than one character in length");0!==s;){for(;r(s);)s=e.input.charCodeAt(++e.position);if(35===s){do s=e.input.charCodeAt(++e.position);while(0!==s&&!i(s));break}if(i(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&b(e),H.call(se,n)?se[n](e,n,o):m(e,'unknown document directive "'+n+'"')}return w(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,w(e,!0,-1)):u&&d(e,"directives end mark is expected"),U(e,e.lineIndent-1,K,!1,!0),w(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(l,e.position))&&m(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&x(e)?void(46===e.input.charCodeAt(e.position)&&(e.position+=3,w(e,!0,-1))):void(e.position<e.length-1&&d(e,"end of the stream or a document separator is expected"))}function P(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new h(e,t);for(n.input+="\x00";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)M(n);return n.documents}function L(e,t,n){var i,r,a=P(e,n);for(i=0,r=a.length;r>i;i+=1)t(a[i])}function D(e,t){var n=P(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new B("expected a single document in the stream, but found more")}}function R(e,t,n){L(e,t,F.extend({schema:q},n))}function N(e,t){return D(e,F.extend({schema:q},t))}for(var F=e("./common"),B=e("./exception"),V=e("./mark"),q=e("./schema/default_safe"),z=e("./schema/default_full"),H=Object.prototype.hasOwnProperty,J=1,Q=2,Y=3,K=4,W=1,X=2,G=3,Z=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,ee=/[\x85\u2028\u2029]/,te=/[,\[\]\{\}]/,ne=/^(?:!|!!|![a-z\-]+!)$/i,ie=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,re=new Array(256),ae=new Array(256),oe=0;256>oe;oe++)re[oe]=c(oe)?1:0,ae[oe]=c(oe);var se={YAML:function(e,t,n){var i,r,a;null!==e.version&&d(e,"duplication of %YAML directive"),1!==n.length&&d(e,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),\r
+null===i&&d(e,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),a=parseInt(i[2],10),1!==r&&d(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=2>a,1!==a&&2!==a&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var i,r;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),i=n[0],r=n[1],ne.test(i)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),H.call(e.tagMap,i)&&d(e,'there is a previously declared suffix for "'+i+'" tag handle'),ie.test(r)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[i]=r}};t.exports.loadAll=L,t.exports.load=D,t.exports.safeLoadAll=R,t.exports.safeLoad=N},{"./common":23,"./exception":25,"./mark":27,"./schema/default_full":30,"./schema/default_safe":31}],27:[function(e,t,n){"use strict";function i(e,t,n,i,r){this.name=e,this.buffer=t,this.position=n,this.line=i,this.column=r}var r=e("./common");i.prototype.getSnippet=function(e,t){var n,i,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",i=this.position;i>0&&-1==="\x00\r\n\85\u2028\u2029".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=" ... ",i+=5;break}for(a="",o=this.position;o<this.buffer.length&&-1==="\x00\r\n\85\u2028\u2029".indexOf(this.buffer.charAt(o));)if(o+=1,o-this.position>t/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(i,o),r.repeat(" ",e)+n+s+a+"\n"+r.repeat(" ",e+this.position-i+n.length)+"^"},i.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=i},{"./common":23}],28:[function(e,t,n){"use strict";function i(e,t,n){var r=[];return e.include.forEach(function(e){n=i(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&r.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===r.indexOf(t)})}function r(){function e(e){i[e.tag]=e}var t,n,i={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return i}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=i(this,"implicit",[]),this.compiledExplicit=i(this,"explicit",[]),this.compiledTypeMap=r(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),s=e("./exception"),l=e("./type");a.DEFAULT=null,a.create=function(){var e,t;switch(arguments.length){case 1:e=a.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof a}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof l}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:e,explicit:t})},t.exports=a},{"./common":23,"./exception":25,"./type":34}],29:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./json")]})},{"../schema":28,"./json":33}],30:[function(e,t,n){"use strict";var i=e("../schema");t.exports=i.DEFAULT=new i({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":28,"../type/js/function":39,"../type/js/regexp":40,"../type/js/undefined":41,"./default_safe":31}],31:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":28,"../type/binary":35,"../type/merge":43,"../type/omap":45,"../type/pairs":46,"../type/set":48,"../type/timestamp":50,"./core":29}],32:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":28,"../type/map":42,"../type/seq":47,"../type/str":49}],33:[function(e,t,n){"use strict";var i=e("../schema");t.exports=new i({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":28,"../type/bool":36,"../type/float":37,"../type/int":38,"../type/null":44,"./failsafe":32}],34:[function(e,t,n){"use strict";function i(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function r(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new a('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=i(t.styleAliases||null),-1===s.indexOf(this.kind))throw new a('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var a=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=r},{"./exception":25}],35:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t,n,i=0,r=e.length,a=u;for(n=0;r>n;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;i+=6}return i%8===0}function r(e){var t,n,i=e.replace(/[\r\n=]/g,""),r=i.length,a=u,o=0,l=[];for(t=0;r>t;t++)t%4===0&&t&&(l.push(o>>16&255),l.push(o>>8&255),l.push(255&o)),o=o<<6|a.indexOf(i.charAt(t));return n=r%4*6,0===n?(l.push(o>>16&255),l.push(o>>8&255),l.push(255&o)):18===n?(l.push(o>>10&255),l.push(o>>2&255)):12===n&&l.push(o>>4&255),s?new s(l):l}function a(e){var t,n,i="",r=0,a=e.length,o=u;for(t=0;a>t;t++)t%3===0&&t&&(i+=o[r>>18&63],i+=o[r>>12&63],i+=o[r>>6&63],i+=o[63&r]),r=(r<<8)+e[t];return n=a%3,0===n?(i+=o[r>>18&63],i+=o[r>>12&63],i+=o[r>>6&63],i+=o[63&r]):2===n?(i+=o[r>>10&63],i+=o[r>>4&63],i+=o[r<<2&63],i+=o[64]):1===n&&(i+=o[r>>2&63],i+=o[r<<4&63],i+=o[64],i+=o[64]),i}function o(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,l=e("../type"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new l("tag:yaml.org,2002:binary",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:a})},{"../type":34,buffer:12}],36:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function r(e){return"true"===e||"True"===e||"TRUE"===e}function a(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":34}],37:[function(e,t,n){"use strict";function i(e){return null===e?!1:!!u.test(e)}function r(e){var t,n,i,r;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach(function(e){r.unshift(parseFloat(e,10))}),t=0,i=1,r.forEach(function(e){t+=e*i,i*=60}),n*t):n*parseFloat(t,10)}function a(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),c.test(n)?n.replace("e",".e"):n}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!==0||s.isNegativeZero(e))}var s=e("../common"),l=e("../type"),u=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),c=/^[-+]?[0-9]+e/;t.exports=new l("tag:yaml.org,2002:float",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:a,defaultStyle:"lowercase"})},{"../common":23,"../type":34}],38:[function(e,t,n){"use strict";function i(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function r(e){return e>=48&&55>=e}function a(e){return e>=48&&57>=e}function o(e){if(null===e)return!1;var t,n=e.length,o=0,s=!1;if(!n)return!1;if(t=e[o],"-"!==t&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===n)return!0;if(t=e[++o],"b"===t){for(o++;n>o;o++)if(t=e[o],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(o++;n>o;o++)if(t=e[o],"_"!==t){if(!i(e.charCodeAt(o)))return!1;s=!0}return s}for(;n>o;o++)if(t=e[o],"_"!==t){if(!r(e.charCodeAt(o)))return!1;s=!0}return s}for(;n>o;o++)if(t=e[o],"_"!==t){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(o)):!1}function s(e){var t,n,i=e,r=1,a=[];return-1!==i.indexOf("_")&&(i=i.replace(/_/g,"")),t=i[0],"-"!==t&&"+"!==t||("-"===t&&(r=-1),i=i.slice(1),t=i[0]),"0"===i?0:"0"===t?"b"===i[1]?r*parseInt(i.slice(2),2):"x"===i[1]?r*parseInt(i,16):r*parseInt(i,8):-1!==i.indexOf(":")?(i.split(":").forEach(function(e){a.unshift(parseInt(e,10))}),i=0,n=1,a.forEach(function(e){i+=e*n,n*=60}),r*i):r*parseInt(i,10)}function l(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1===0&&!u.isNegativeZero(e)}var u=e("../common"),c=e("../type");t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:s,predicate:l,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":23,"../type":34}],39:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&"FunctionExpression"===n.body[0].expression.type}catch(i){return!1}}function r(e){var t,n="("+e+")",i=s.parse(n,{range:!0}),r=[];if("Program"!==i.type||1!==i.body.length||"ExpressionStatement"!==i.body[0].type||"FunctionExpression"!==i.body[0].expression.type)throw new Error("Failed to resolve function");return i.body[0].expression.params.forEach(function(e){r.push(e.name)}),t=i.body[0].expression.body.range,new Function(r,n.slice(t[0]+1,t[1]-1))}function a(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{var l=e;s=l("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var c=e("../../type");t.exports=new c("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:a})},{"../../type":34}],40:[function(e,t,n){"use strict";function i(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),i="";if("/"===t[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==t[t.length-i.length-1])return!1}return!0}function r(e){var t=e,n=/\/([gim]*)$/.exec(e),i="";return"/"===t[0]&&(n&&(i=n[1]),t=t.slice(1,t.length-i.length-1)),new RegExp(t,i)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:a})},{"../../type":34}],41:[function(e,t,n){"use strict";function i(){return!0}function r(){}function a(){return""}function o(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:i,construct:r,predicate:o,represent:a})},{"../../type":34}],42:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":34}],43:[function(e,t,n){"use strict";function i(e){return"<<"===e||null===e}var r=e("../type");t.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:i})},{"../type":34}],44:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function r(){return null}function a(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:i,construct:r,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":34}],45:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,a,l=[],u=e;for(t=0,n=u.length;n>t;t+=1){if(i=u[t],a=!1,"[object Object]"!==s.call(i))return!1;for(r in i)if(o.call(i,r)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==l.indexOf(r))return!1;l.push(r)}return!0}function r(e){return null!==e?e:[]}var a=e("../type"),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:r})},{"../type":34}],46:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n,i,r,a,s=e;for(a=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(i=s[t],"[object Object]"!==o.call(i))return!1;if(r=Object.keys(i),1!==r.length)return!1;a[t]=[r[0],i[r[0]]]}return!0}function r(e){if(null===e)return[];var t,n,i,r,a,o=e;for(a=new Array(o.length),t=0,n=o.length;n>t;t+=1)i=o[t],r=Object.keys(i),a[t]=[r[0],i[r[0]]];return a}var a=e("../type"),o=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:i,construct:r})},{"../type":34}],47:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":34}],48:[function(e,t,n){"use strict";function i(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function r(e){return null!==e?e:{}}var a=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:i,construct:r})},{"../type":34}],49:[function(e,t,n){"use strict";var i=e("../type");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":34}],50:[function(e,t,n){"use strict";function i(e){return null===e?!1:null!==s.exec(e)}function r(e){var t,n,i,r,a,o,l,u,c,p,h=0,f=null;if(t=s.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],i=+t[2]-1,r=+t[3],!t[4])return new Date(Date.UTC(n,i,r));if(a=+t[4],o=+t[5],l=+t[6],t[7]){for(h=t[7].slice(0,3);h.length<3;)h+="0";h=+h}return t[9]&&(u=+t[10],c=+(t[11]||0),f=6e4*(60*u+c),"-"===t[9]&&(f=-f)),p=new Date(Date.UTC(n,i,r,a,o,l,h)),f&&p.setTime(p.getTime()-f),p}function a(e){return e.toISOString()}var o=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:r,instanceOf:Date,represent:a})},{"../type":34}],51:[function(e,t,n){function i(e,t,n){var i=e?e.length:0;if(!i)return-1;if("number"==typeof n)n=0>n?o(i+n,0):n;else if(n){var s=a(e,t);return i>s&&(t===t?t===e[s]:e[s]!==e[s])?s:-1}return r(e,t,n||0)}var r=e("../internal/baseIndexOf"),a=e("../internal/binaryIndex"),o=Math.max;t.exports=i},{"../internal/baseIndexOf":80,"../internal/binaryIndex":94}],52:[function(e,t,n){function i(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=i},{}],53:[function(e,t,n){function i(e){if(l(e)&&!s(e)&&!(e instanceof r)){if(e instanceof a)return e;if(p.call(e,"__chain__")&&p.call(e,"__wrapped__"))return u(e)}return new a(e)}var r=e("../internal/LazyWrapper"),a=e("../internal/LodashWrapper"),o=e("../internal/baseLodash"),s=e("../lang/isArray"),l=e("../internal/isObjectLike"),u=e("../internal/wrapperClone"),c=Object.prototype,p=c.hasOwnProperty;i.prototype=o.prototype,t.exports=i},{"../internal/LazyWrapper":62,"../internal/LodashWrapper":63,"../internal/baseLodash":84,"../internal/isObjectLike":128,"../internal/wrapperClone":139,"../lang/isArray":142}],54:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":56}],55:[function(e,t,n){var i=e("../internal/baseEach"),r=e("../internal/createFind"),a=r(i);t.exports=a},{"../internal/baseEach":73,"../internal/createFind":104}],56:[function(e,t,n){var i=e("../internal/arrayEach"),r=e("../internal/baseEach"),a=e("../internal/createForEach"),o=a(i,r);t.exports=o},{"../internal/arrayEach":65,"../internal/baseEach":73,"../internal/createForEach":105}],57:[function(e,t,n){function i(e,t,n,i){var h=e?a(e):0;return l(h)||(e=c(e),h=e.length),n="number"!=typeof n||i&&s(t,n,i)?0:0>n?p(h+n,0):n||0,"string"==typeof e||!o(e)&&u(e)?h>=n&&e.indexOf(t,n)>-1:!!h&&r(e,t,n)>-1}var r=e("../internal/baseIndexOf"),a=e("../internal/getLength"),o=e("../lang/isArray"),s=e("../internal/isIterateeCall"),l=e("../internal/isLength"),u=e("../lang/isString"),c=e("../object/values"),p=Math.max;t.exports=i},{"../internal/baseIndexOf":80,"../internal/getLength":114,"../internal/isIterateeCall":124,"../internal/isLength":127,"../lang/isArray":142,"../lang/isString":148,"../object/values":154}],58:[function(e,t,n){function i(e,t,n){var i=s(e)?r:o;return t=a(t,n,3),i(e,t)}var r=e("../internal/arrayMap"),a=e("../internal/baseCallback"),o=e("../internal/baseMap"),s=e("../lang/isArray");t.exports=i},{"../internal/arrayMap":66,"../internal/baseCallback":69,"../internal/baseMap":85,"../lang/isArray":142}],59:[function(e,t,n){var i=e("../internal/getNative"),r=i(Date,"now"),a=r||function(){return(new Date).getTime()};t.exports=a},{"../internal/getNative":116}],60:[function(e,t,n){var i=e("../internal/createWrapper"),r=e("../internal/replaceHolders"),a=e("./restParam"),o=1,s=32,l=a(function(e,t,n){var a=o;if(n.length){var u=r(n,l.placeholder);a|=s}return i(e,a,t,n,u)});l.placeholder={},t.exports=l},{"../internal/createWrapper":108,"../internal/replaceHolders":134,"./restParam":61}],61:[function(e,t,n){function i(e,t){if("function"!=typeof e)throw new TypeError(r);return t=a(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,i=-1,r=a(n.length-t,0),o=Array(r);++i<r;)o[i]=n[t+i];switch(t){case 0:return e.call(this,o);case 1:return e.call(this,n[0],o);case 2:return e.call(this,n[0],n[1],o)}var s=Array(t+1);for(i=-1;++i<t;)s[i]=n[i];return s[t]=o,e.apply(this,s)}}var r="Expected a function",a=Math.max;t.exports=i},{}],62:[function(e,t,n){function i(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}var r=e("./baseCreate"),a=e("./baseLodash"),o=Number.POSITIVE_INFINITY;i.prototype=r(a.prototype),i.prototype.constructor=i,t.exports=i},{"./baseCreate":72,"./baseLodash":84}],63:[function(e,t,n){function i(e,t,n){this.__wrapped__=e,this.__actions__=n||[],this.__chain__=!!t}var r=e("./baseCreate"),a=e("./baseLodash");i.prototype=r(a.prototype),i.prototype.constructor=i,t.exports=i},{"./baseCreate":72,"./baseLodash":84}],64:[function(e,t,n){function i(e,t){var n=-1,i=e.length;for(t||(t=Array(i));++n<i;)t[n]=e[n];return t}t.exports=i},{}],65:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length;++n<i&&t(e[n],n,e)!==!1;);return e}t.exports=i},{}],66:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length,r=Array(i);++n<i;)r[n]=t(e[n],n,e);return r}t.exports=i},{}],67:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length;++n<i;)if(t(e[n],n,e))return!0;return!1}t.exports=i},{}],68:[function(e,t,n){function i(e,t){return null==t?e:r(t,a(t),e)}var r=e("./baseCopy"),a=e("../object/keys");t.exports=i},{"../object/keys":151,"./baseCopy":71}],69:[function(e,t,n){function i(e,t,n){var i=typeof e;return"function"==i?void 0===t?e:o(e,t,n):null==e?s:"object"==i?r(e):void 0===t?l(e):a(e,t)}var r=e("./baseMatches"),a=e("./baseMatchesProperty"),o=e("./bindCallback"),s=e("../utility/identity"),l=e("../utility/property");t.exports=i},{"../utility/identity":156,"../utility/property":158,"./baseMatches":86,"./baseMatchesProperty":87,"./bindCallback":96}],70:[function(e,t,n){function i(e,t,n,m,g,y,v){var w;if(n&&(w=g?n(e,m,g):n(e)),void 0!==w)return w;if(!f(e))return e;var x=p(e);if(x){if(w=l(e),!t)return r(e,w)}else{var O=N.call(e),j=O==b;if(O!=A&&O!=d&&(!j||g))return D[O]?u(e,O,t):g?e:{};if(h(e))return g?e:{};if(w=c(j?{}:e),!t)return o(w,e)}y||(y=[]),v||(v=[]);for(var _=y.length;_--;)if(y[_]==e)return v[_];return y.push(e),v.push(w),(x?a:s)(e,function(r,a){w[a]=i(r,t,n,a,e,y,v)}),w}var r=e("./arrayCopy"),a=e("./arrayEach"),o=e("./baseAssign"),s=e("./baseForOwn"),l=e("./initCloneArray"),u=e("./initCloneByTag"),c=e("./initCloneObject"),p=e("../lang/isArray"),h=e("./isHostObject"),f=e("../lang/isObject"),d="[object Arguments]",m="[object Array]",g="[object Boolean]",y="[object Date]",v="[object Error]",b="[object Function]",w="[object Map]",x="[object Number]",A="[object Object]",O="[object RegExp]",j="[object Set]",_="[object String]",S="[object WeakMap]",k="[object ArrayBuffer]",C="[object Float32Array]",E="[object Float64Array]",I="[object Int8Array]",T="[object Int16Array]",$="[object Int32Array]",U="[object Uint8Array]",M="[object Uint8ClampedArray]",P="[object Uint16Array]",L="[object Uint32Array]",D={};D[d]=D[m]=D[k]=D[g]=D[y]=D[C]=D[E]=D[I]=D[T]=D[$]=D[x]=D[A]=D[O]=D[_]=D[U]=D[M]=D[P]=D[L]=!0,D[v]=D[b]=D[w]=D[j]=D[S]=!1;var R=Object.prototype,N=R.toString;t.exports=i},{"../lang/isArray":142,"../lang/isObject":146,"./arrayCopy":64,"./arrayEach":65,"./baseAssign":68,"./baseForOwn":78,"./initCloneArray":118,"./initCloneByTag":119,"./initCloneObject":120,"./isHostObject":122}],71:[function(e,t,n){function i(e,t,n){n||(n={});for(var i=-1,r=t.length;++i<r;){var a=t[i];n[a]=e[a]}return n}t.exports=i},{}],72:[function(e,t,n){var i=e("../lang/isObject"),r=function(){function e(){}return function(t){if(i(t)){e.prototype=t;var n=new e;e.prototype=void 0}return n||{}}}();t.exports=r},{"../lang/isObject":146}],73:[function(e,t,n){var i=e("./baseForOwn"),r=e("./createBaseEach"),a=r(i);t.exports=a},{"./baseForOwn":78,"./createBaseEach":100}],74:[function(e,t,n){function i(e,t,n,i){var r;return n(e,function(e,n,a){return t(e,n,a)?(r=i?n:e,!1):void 0}),r}t.exports=i},{}],75:[function(e,t,n){function i(e,t,n){for(var i=e.length,r=n?i:-1;n?r--:++r<i;)if(t(e[r],r,e))return r;return-1}t.exports=i},{}],76:[function(e,t,n){var i=e("./createBaseFor"),r=i();t.exports=r},{"./createBaseFor":101}],77:[function(e,t,n){function i(e,t){return r(e,t,a)}var r=e("./baseFor"),a=e("../object/keysIn");t.exports=i},{"../object/keysIn":152,"./baseFor":76}],78:[function(e,t,n){function i(e,t){return r(e,t,a)}var r=e("./baseFor"),a=e("../object/keys");t.exports=i},{"../object/keys":151,"./baseFor":76}],79:[function(e,t,n){function i(e,t,n){if(null!=e){e=r(e),void 0!==n&&n in e&&(t=[n]);for(var i=0,a=t.length;null!=e&&a>i;)e=r(e)[t[i++]];return i&&i==a?e:void 0}}var r=e("./toObject");t.exports=i},{"./toObject":137}],80:[function(e,t,n){function i(e,t,n){if(t!==t)return r(e,n);for(var i=n-1,a=e.length;++i<a;)if(e[i]===t)return i;return-1}var r=e("./indexOfNaN");t.exports=i},{"./indexOfNaN":117}],81:[function(e,t,n){function i(e,t,n,s,l,u){return e===t?!0:null==e||null==t||!a(e)&&!o(t)?e!==e&&t!==t:r(e,t,i,n,s,l,u)}var r=e("./baseIsEqualDeep"),a=e("../lang/isObject"),o=e("./isObjectLike");t.exports=i},{"../lang/isObject":146,"./baseIsEqualDeep":82,"./isObjectLike":128}],82:[function(e,t,n){function i(e,t,n,i,f,g,y){var v=s(e),b=s(t),w=p,x=p;v||(w=m.call(e),w==c?w=h:w!=h&&(v=u(e))),b||(x=m.call(t),x==c?x=h:x!=h&&(b=u(t)));var A=w==h&&!l(e),O=x==h&&!l(t),j=w==x;if(j&&!v&&!A)return a(e,t,w);if(!f){var _=A&&d.call(e,"__wrapped__"),S=O&&d.call(t,"__wrapped__");if(_||S)return n(_?e.value():e,S?t.value():t,i,f,g,y)}if(!j)return!1;g||(g=[]),y||(y=[]);for(var k=g.length;k--;)if(g[k]==e)return y[k]==t;g.push(e),y.push(t);var C=(v?r:o)(e,t,n,i,f,g,y);return g.pop(),y.pop(),C}var r=e("./equalArrays"),a=e("./equalByTag"),o=e("./equalObjects"),s=e("../lang/isArray"),l=e("./isHostObject"),u=e("../lang/isTypedArray"),c="[object Arguments]",p="[object Array]",h="[object Object]",f=Object.prototype,d=f.hasOwnProperty,m=f.toString;t.exports=i},{"../lang/isArray":142,"../lang/isTypedArray":149,"./equalArrays":109,"./equalByTag":110,"./equalObjects":111,"./isHostObject":122}],83:[function(e,t,n){function i(e,t,n){var i=t.length,o=i,s=!n;if(null==e)return!o;for(e=a(e);i--;){var l=t[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<o;){l=t[i];var u=l[0],c=e[u],p=l[1];if(s&&l[2]){if(void 0===c&&!(u in e))return!1}else{var h=n?n(c,p,u):void 0;if(!(void 0===h?r(p,c,n,!0):h))return!1}}return!0}var r=e("./baseIsEqual"),a=e("./toObject");t.exports=i},{"./baseIsEqual":81,"./toObject":137}],84:[function(e,t,n){function i(){}t.exports=i},{}],85:[function(e,t,n){function i(e,t){var n=-1,i=a(e)?Array(e.length):[];return r(e,function(e,r,a){i[++n]=t(e,r,a)}),i}var r=e("./baseEach"),a=e("./isArrayLike");t.exports=i},{"./baseEach":73,"./isArrayLike":121}],86:[function(e,t,n){function i(e){var t=a(e);if(1==t.length&&t[0][2]){var n=t[0][0],i=t[0][1];return function(e){return null==e?!1:(e=o(e),e[n]===i&&(void 0!==i||n in e))}}return function(e){return r(e,t)}}var r=e("./baseIsMatch"),a=e("./getMatchData"),o=e("./toObject");t.exports=i},{"./baseIsMatch":83,"./getMatchData":115,"./toObject":137}],87:[function(e,t,n){function i(e,t){var n=s(e),i=l(e)&&u(t),f=e+"";return e=h(e),function(s){if(null==s)return!1;var l=f;if(s=p(s),(n||!i)&&!(l in s)){if(s=1==e.length?s:r(s,o(e,0,-1)),null==s)return!1;l=c(e),s=p(s)}return s[l]===t?void 0!==t||l in s:a(t,s[l],void 0,!0)}}var r=e("./baseGet"),a=e("./baseIsEqual"),o=e("./baseSlice"),s=e("../lang/isArray"),l=e("./isKey"),u=e("./isStrictComparable"),c=e("../array/last"),p=e("./toObject"),h=e("./toPath");t.exports=i},{"../array/last":52,"../lang/isArray":142,"./baseGet":79,"./baseIsEqual":81,"./baseSlice":91,"./isKey":125,"./isStrictComparable":129,"./toObject":137,"./toPath":138}],88:[function(e,t,n){function i(e){return function(t){return null==t?void 0:r(t)[e]}}var r=e("./toObject");t.exports=i},{"./toObject":137}],89:[function(e,t,n){function i(e){var t=e+"";return e=a(e),function(n){return r(n,e,t)}}var r=e("./baseGet"),a=e("./toPath");t.exports=i},{"./baseGet":79,"./toPath":138}],90:[function(e,t,n){var i=e("../utility/identity"),r=e("./metaMap"),a=r?function(e,t){return r.set(e,t),e}:i;t.exports=a},{"../utility/identity":156,"./metaMap":131}],91:[function(e,t,n){function i(e,t,n){var i=-1,r=e.length;t=null==t?0:+t||0,0>t&&(t=-t>r?0:r+t),n=void 0===n||n>r?r:+n||0,0>n&&(n+=r),r=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(r);++i<r;)a[i]=e[i+t];return a}t.exports=i},{}],92:[function(e,t,n){function i(e){return null==e?"":e+""}t.exports=i},{}],93:[function(e,t,n){function i(e,t){for(var n=-1,i=t.length,r=Array(i);++n<i;)r[n]=e[t[n]];return r}t.exports=i},{}],94:[function(e,t,n){function i(e,t,n){var i=0,o=e?e.length:i;if("number"==typeof t&&t===t&&s>=o){for(;o>i;){var l=i+o>>>1,u=e[l];(n?t>=u:t>u)&&null!==u?i=l+1:o=l}return o}return r(e,t,a,n)}var r=e("./binaryIndexBy"),a=e("../utility/identity"),o=4294967295,s=o>>>1;t.exports=i},{"../utility/identity":156,"./binaryIndexBy":95}],95:[function(e,t,n){function i(e,t,n,i){t=n(t);for(var o=0,l=e?e.length:0,u=t!==t,c=null===t,p=void 0===t;l>o;){var h=r((o+l)/2),f=n(e[h]),d=void 0!==f,m=f===f;if(u)var g=m||i;else g=c?m&&d&&(i||null!=f):p?m&&(i||d):null==f?!1:i?t>=f:t>f;g?o=h+1:l=h}return a(l,s)}var r=Math.floor,a=Math.min,o=4294967295,s=o-1;t.exports=i},{}],96:[function(e,t,n){function i(e,t,n){if("function"!=typeof e)return r;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,i,r){return e.call(t,n,i,r)};case 4:return function(n,i,r,a){return e.call(t,n,i,r,a)};case 5:return function(n,i,r,a,o){return e.call(t,n,i,r,a,o)}}return function(){return e.apply(t,arguments)}}var r=e("../utility/identity");t.exports=i},{"../utility/identity":156}],97:[function(e,t,n){(function(e){function n(e){var t=new i(e.byteLength),n=new r(t);return n.set(new r(e)),t}var i=e.ArrayBuffer,r=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],98:[function(e,t,n){function i(e,t,n){for(var i=n.length,a=-1,o=r(e.length-i,0),s=-1,l=t.length,u=Array(l+o);++s<l;)u[s]=t[s];for(;++a<i;)u[n[a]]=e[a];for(;o--;)u[s++]=e[a++];return u}var r=Math.max;t.exports=i},{}],99:[function(e,t,n){function i(e,t,n){for(var i=-1,a=n.length,o=-1,s=r(e.length-a,0),l=-1,u=t.length,c=Array(s+u);++o<s;)c[o]=e[o];for(var p=o;++l<u;)c[p+l]=t[l];for(;++i<a;)c[p+n[i]]=e[o++];return c}var r=Math.max;t.exports=i},{}],100:[function(e,t,n){function i(e,t){return function(n,i){var s=n?r(n):0;if(!a(s))return e(n,i);for(var l=t?s:-1,u=o(n);(t?l--:++l<s)&&i(u[l],l,u)!==!1;);return n}}var r=e("./getLength"),a=e("./isLength"),o=e("./toObject");t.exports=i},{"./getLength":114,"./isLength":127,"./toObject":137}],101:[function(e,t,n){function i(e){return function(t,n,i){for(var a=r(t),o=i(t),s=o.length,l=e?s:-1;e?l--:++l<s;){var u=o[l];if(n(a[u],u,a)===!1)break}return t}}var r=e("./toObject");t.exports=i},{"./toObject":137}],102:[function(e,t,n){(function(n){function i(e,t){function i(){var r=this&&this!==n&&this instanceof i?a:e;return r.apply(t,arguments)}var a=r(e);return i}var r=e("./createCtorWrapper");t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./createCtorWrapper":103}],103:[function(e,t,n){function i(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),i=e.apply(n,t);return a(i)?i:n}}var r=e("./baseCreate"),a=e("../lang/isObject");t.exports=i},{"../lang/isObject":146,"./baseCreate":72}],104:[function(e,t,n){function i(e,t){return function(n,i,l){if(i=r(i,l,3),s(n)){var u=o(n,i,t);return u>-1?n[u]:void 0}return a(n,i,e)}}var r=e("./baseCallback"),a=e("./baseFind"),o=e("./baseFindIndex"),s=e("../lang/isArray");t.exports=i},{"../lang/isArray":142,"./baseCallback":69,"./baseFind":74,"./baseFindIndex":75}],105:[function(e,t,n){function i(e,t){return function(n,i,o){return"function"==typeof i&&void 0===o&&a(n)?e(n,i):t(n,r(i,o,3))}}var r=e("./bindCallback"),a=e("../lang/isArray");t.exports=i},{"../lang/isArray":142,"./bindCallback":96}],106:[function(e,t,n){(function(n){function i(e,t,x,A,O,j,_,S,k,C){function E(){for(var d=arguments.length,m=d,g=Array(d);m--;)g[m]=arguments[m];if(A&&(g=a(g,A,O)),j&&(g=o(g,j,_)),U||P){var b=E.placeholder,D=c(g,b);if(d-=D.length,C>d){var R=S?r(S):void 0,N=w(C-d,0),F=U?D:void 0,B=U?void 0:D,V=U?g:void 0,q=U?void 0:g;t|=U?y:v,t&=~(U?v:y),M||(t&=~(h|f));var z=[e,t,x,V,F,q,B,R,k,N],H=i.apply(void 0,z);return l(e)&&p(H,z),H.placeholder=b,H}}var J=T?x:this,Q=$?J[e]:e;return S&&(g=u(g,S)),I&&k<g.length&&(g.length=k),this&&this!==n&&this instanceof E&&(Q=L||s(e)),Q.apply(J,g)}var I=t&b,T=t&h,$=t&f,U=t&m,M=t&d,P=t&g,L=$?void 0:s(e);return E;\r
+}var r=e("./arrayCopy"),a=e("./composeArgs"),o=e("./composeArgsRight"),s=e("./createCtorWrapper"),l=e("./isLaziable"),u=e("./reorder"),c=e("./replaceHolders"),p=e("./setData"),h=1,f=2,d=4,m=8,g=16,y=32,v=64,b=128,w=Math.max;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./arrayCopy":64,"./composeArgs":98,"./composeArgsRight":99,"./createCtorWrapper":103,"./isLaziable":126,"./reorder":133,"./replaceHolders":134,"./setData":135}],107:[function(e,t,n){(function(n){function i(e,t,i,o){function s(){for(var t=-1,r=arguments.length,a=-1,c=o.length,p=Array(c+r);++a<c;)p[a]=o[a];for(;r--;)p[a++]=arguments[++t];var h=this&&this!==n&&this instanceof s?u:e;return h.apply(l?i:this,p)}var l=t&a,u=r(e);return s}var r=e("./createCtorWrapper"),a=1;t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./createCtorWrapper":103}],108:[function(e,t,n){function i(e,t,n,i,y,v,b,w){var x=t&h;if(!x&&"function"!=typeof e)throw new TypeError(m);var A=i?i.length:0;if(A||(t&=~(f|d),i=y=void 0),A-=y?y.length:0,t&d){var O=i,j=y;i=y=void 0}var _=x?void 0:l(e),S=[e,t,n,i,y,O,j,v,b,w];if(_&&(u(S,_),t=S[1],w=S[9]),S[9]=null==w?x?0:e.length:g(w-A,0)||0,t==p)var k=a(S[0],S[2]);else k=t!=f&&t!=(p|f)||S[4].length?o.apply(void 0,S):s.apply(void 0,S);var C=_?r:c;return C(k,S)}var r=e("./baseSetData"),a=e("./createBindWrapper"),o=e("./createHybridWrapper"),s=e("./createPartialWrapper"),l=e("./getData"),u=e("./mergeData"),c=e("./setData"),p=1,h=2,f=32,d=64,m="Expected a function",g=Math.max;t.exports=i},{"./baseSetData":90,"./createBindWrapper":102,"./createHybridWrapper":106,"./createPartialWrapper":107,"./getData":112,"./mergeData":130,"./setData":135}],109:[function(e,t,n){function i(e,t,n,i,a,o,s){var l=-1,u=e.length,c=t.length;if(u!=c&&!(a&&c>u))return!1;for(;++l<u;){var p=e[l],h=t[l],f=i?i(a?h:p,a?p:h,l):void 0;if(void 0!==f){if(f)continue;return!1}if(a){if(!r(t,function(e){return p===e||n(p,e,i,a,o,s)}))return!1}else if(p!==h&&!n(p,h,i,a,o,s))return!1}return!0}var r=e("./arraySome");t.exports=i},{"./arraySome":67}],110:[function(e,t,n){function i(e,t,n){switch(n){case r:case a:return+e==+t;case o:return e.name==t.name&&e.message==t.message;case s:return e!=+e?t!=+t:e==+t;case l:case u:return e==t+""}return!1}var r="[object Boolean]",a="[object Date]",o="[object Error]",s="[object Number]",l="[object RegExp]",u="[object String]";t.exports=i},{}],111:[function(e,t,n){function i(e,t,n,i,a,s,l){var u=r(e),c=u.length,p=r(t),h=p.length;if(c!=h&&!a)return!1;for(var f=c;f--;){var d=u[f];if(!(a?d in t:o.call(t,d)))return!1}for(var m=a;++f<c;){d=u[f];var g=e[d],y=t[d],v=i?i(a?y:g,a?g:y,d):void 0;if(!(void 0===v?n(g,y,i,a,s,l):v))return!1;m||(m="constructor"==d)}if(!m){var b=e.constructor,w=t.constructor;if(b!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w))return!1}return!0}var r=e("../object/keys"),a=Object.prototype,o=a.hasOwnProperty;t.exports=i},{"../object/keys":151}],112:[function(e,t,n){var i=e("./metaMap"),r=e("../utility/noop"),a=i?function(e){return i.get(e)}:r;t.exports=a},{"../utility/noop":157,"./metaMap":131}],113:[function(e,t,n){function i(e){for(var t=e.name+"",n=r[t],i=n?n.length:0;i--;){var a=n[i],o=a.func;if(null==o||o==e)return a.name}return t}var r=e("./realNames");t.exports=i},{"./realNames":132}],114:[function(e,t,n){var i=e("./baseProperty"),r=i("length");t.exports=r},{"./baseProperty":88}],115:[function(e,t,n){function i(e){for(var t=a(e),n=t.length;n--;)t[n][2]=r(t[n][1]);return t}var r=e("./isStrictComparable"),a=e("../object/pairs");t.exports=i},{"../object/pairs":153,"./isStrictComparable":129}],116:[function(e,t,n){function i(e,t){var n=null==e?void 0:e[t];return r(n)?n:void 0}var r=e("../lang/isNative");t.exports=i},{"../lang/isNative":145}],117:[function(e,t,n){function i(e,t,n){for(var i=e.length,r=t+(n?0:-1);n?r--:++r<i;){var a=e[r];if(a!==a)return r}return-1}t.exports=i},{}],118:[function(e,t,n){function i(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&a.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var r=Object.prototype,a=r.hasOwnProperty;t.exports=i},{}],119:[function(e,t,n){(function(n){function i(e,t,n){var i=e.constructor;switch(t){case c:return r(e);case a:case o:return new i(+e);case p:case h:case f:case d:case m:case g:case y:case v:case b:i instanceof i&&(i=A[t]);var x=e.buffer;return new i(n?r(x):x,e.byteOffset,e.length);case s:case u:return new i(e);case l:var O=new i(e.source,w.exec(e));O.lastIndex=e.lastIndex}return O}var r=e("./bufferClone"),a="[object Boolean]",o="[object Date]",s="[object Number]",l="[object RegExp]",u="[object String]",c="[object ArrayBuffer]",p="[object Float32Array]",h="[object Float64Array]",f="[object Int8Array]",d="[object Int16Array]",m="[object Int32Array]",g="[object Uint8Array]",y="[object Uint8ClampedArray]",v="[object Uint16Array]",b="[object Uint32Array]",w=/\w*$/,x=n.Uint8Array,A={};A[p]=n.Float32Array,A[h]=n.Float64Array,A[f]=n.Int8Array,A[d]=n.Int16Array,A[m]=n.Int32Array,A[g]=x,A[y]=n.Uint8ClampedArray,A[v]=n.Uint16Array,A[b]=n.Uint32Array,t.exports=i}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./bufferClone":97}],120:[function(e,t,n){function i(e){var t=e.constructor;return"function"==typeof t&&t instanceof t||(t=Object),new t}t.exports=i},{}],121:[function(e,t,n){function i(e){return null!=e&&a(r(e))}var r=e("./getLength"),a=e("./isLength");t.exports=i},{"./getLength":114,"./isLength":127}],122:[function(e,t,n){var i=function(){try{Object({toString:0}+"")}catch(e){return function(){return!1}}return function(e){return"function"!=typeof e.toString&&"string"==typeof(e+"")}}();t.exports=i},{}],123:[function(e,t,n){function i(e,t){return e="number"==typeof e||r.test(e)?+e:-1,t=null==t?a:t,e>-1&&e%1==0&&t>e}var r=/^\d+$/,a=9007199254740991;t.exports=i},{}],124:[function(e,t,n){function i(e,t,n){if(!o(n))return!1;var i=typeof t;if("number"==i?r(n)&&a(t,n.length):"string"==i&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}var r=e("./isArrayLike"),a=e("./isIndex"),o=e("../lang/isObject");t.exports=i},{"../lang/isObject":146,"./isArrayLike":121,"./isIndex":123}],125:[function(e,t,n){function i(e,t){var n=typeof e;if("string"==n&&s.test(e)||"number"==n)return!0;if(r(e))return!1;var i=!o.test(e);return i||null!=t&&e in a(t)}var r=e("../lang/isArray"),a=e("./toObject"),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=i},{"../lang/isArray":142,"./toObject":137}],126:[function(e,t,n){function i(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var i=a(n);return!!i&&e===i[0]}var r=e("./LazyWrapper"),a=e("./getData"),o=e("./getFuncName"),s=e("../chain/lodash");t.exports=i},{"../chain/lodash":53,"./LazyWrapper":62,"./getData":112,"./getFuncName":113}],127:[function(e,t,n){function i(e){return"number"==typeof e&&e>-1&&e%1==0&&r>=e}var r=9007199254740991;t.exports=i},{}],128:[function(e,t,n){function i(e){return!!e&&"object"==typeof e}t.exports=i},{}],129:[function(e,t,n){function i(e){return e===e&&!r(e)}var r=e("../lang/isObject");t.exports=i},{"../lang/isObject":146}],130:[function(e,t,n){function i(e,t){var n=e[1],i=t[1],m=n|i,g=p>m,y=i==p&&n==c||i==p&&n==h&&e[7].length<=t[8]||i==(p|h)&&n==c;if(!g&&!y)return e;i&l&&(e[2]=t[2],m|=n&l?0:u);var v=t[3];if(v){var b=e[3];e[3]=b?a(b,v,t[4]):r(v),e[4]=b?s(e[3],f):r(t[4])}return v=t[5],v&&(b=e[5],e[5]=b?o(b,v,t[6]):r(v),e[6]=b?s(e[5],f):r(t[6])),v=t[7],v&&(e[7]=r(v)),i&p&&(e[8]=null==e[8]?t[8]:d(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var r=e("./arrayCopy"),a=e("./composeArgs"),o=e("./composeArgsRight"),s=e("./replaceHolders"),l=1,u=4,c=8,p=128,h=256,f="__lodash_placeholder__",d=Math.min;t.exports=i},{"./arrayCopy":64,"./composeArgs":98,"./composeArgsRight":99,"./replaceHolders":134}],131:[function(e,t,n){(function(n){var i=e("./getNative"),r=i(n,"WeakMap"),a=r&&new r;t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./getNative":116}],132:[function(e,t,n){var i={};t.exports=i},{}],133:[function(e,t,n){function i(e,t){for(var n=e.length,i=o(t.length,n),s=r(e);i--;){var l=t[i];e[i]=a(l,n)?s[l]:void 0}return e}var r=e("./arrayCopy"),a=e("./isIndex"),o=Math.min;t.exports=i},{"./arrayCopy":64,"./isIndex":123}],134:[function(e,t,n){function i(e,t){for(var n=-1,i=e.length,a=-1,o=[];++n<i;)e[n]===t&&(e[n]=r,o[++a]=n);return o}var r="__lodash_placeholder__";t.exports=i},{}],135:[function(e,t,n){var i=e("./baseSetData"),r=e("../date/now"),a=150,o=16,s=function(){var e=0,t=0;return function(n,s){var l=r(),u=o-(l-t);if(t=l,u>0){if(++e>=a)return n}else e=0;return i(n,s)}}();t.exports=s},{"../date/now":59,"./baseSetData":90}],136:[function(e,t,n){function i(e){for(var t=u(e),n=t.length,i=n&&e.length,c=!!i&&s(i)&&(a(e)||r(e)||l(e)),h=-1,f=[];++h<n;){var d=t[h];(c&&o(d,i)||p.call(e,d))&&f.push(d)}return f}var r=e("../lang/isArguments"),a=e("../lang/isArray"),o=e("./isIndex"),s=e("./isLength"),l=e("../lang/isString"),u=e("../object/keysIn"),c=Object.prototype,p=c.hasOwnProperty;t.exports=i},{"../lang/isArguments":141,"../lang/isArray":142,"../lang/isString":148,"../object/keysIn":152,"./isIndex":123,"./isLength":127}],137:[function(e,t,n){function i(e){if(o.unindexedChars&&a(e)){for(var t=-1,n=e.length,i=Object(e);++t<n;)i[t]=e.charAt(t);return i}return r(e)?e:Object(e)}var r=e("../lang/isObject"),a=e("../lang/isString"),o=e("../support");t.exports=i},{"../lang/isObject":146,"../lang/isString":148,"../support":155}],138:[function(e,t,n){function i(e){if(a(e))return e;var t=[];return r(e).replace(o,function(e,n,i,r){t.push(i?r.replace(s,"$1"):n||e)}),t}var r=e("./baseToString"),a=e("../lang/isArray"),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,s=/\\(\\)?/g;t.exports=i},{"../lang/isArray":142,"./baseToString":92}],139:[function(e,t,n){function i(e){return e instanceof r?e.clone():new a(e.__wrapped__,e.__chain__,o(e.__actions__))}var r=e("./LazyWrapper"),a=e("./LodashWrapper"),o=e("./arrayCopy");t.exports=i},{"./LazyWrapper":62,"./LodashWrapper":63,"./arrayCopy":64}],140:[function(e,t,n){function i(e,t,n){return"function"==typeof t?r(e,!0,a(t,n,3)):r(e,!0)}var r=e("../internal/baseClone"),a=e("../internal/bindCallback");t.exports=i},{"../internal/baseClone":70,"../internal/bindCallback":96}],141:[function(e,t,n){function i(e){return a(e)&&r(e)&&s.call(e,"callee")&&!l.call(e,"callee")}var r=e("../internal/isArrayLike"),a=e("../internal/isObjectLike"),o=Object.prototype,s=o.hasOwnProperty,l=o.propertyIsEnumerable;t.exports=i},{"../internal/isArrayLike":121,"../internal/isObjectLike":128}],142:[function(e,t,n){var i=e("../internal/getNative"),r=e("../internal/isLength"),a=e("../internal/isObjectLike"),o="[object Array]",s=Object.prototype,l=s.toString,u=i(Array,"isArray"),c=u||function(e){return a(e)&&r(e.length)&&l.call(e)==o};t.exports=c},{"../internal/getNative":116,"../internal/isLength":127,"../internal/isObjectLike":128}],143:[function(e,t,n){function i(e){return null==e?!0:o(e)&&(a(e)||u(e)||r(e)||l(e)&&s(e.splice))?!e.length:!c(e).length}var r=e("./isArguments"),a=e("./isArray"),o=e("../internal/isArrayLike"),s=e("./isFunction"),l=e("../internal/isObjectLike"),u=e("./isString"),c=e("../object/keys");t.exports=i},{"../internal/isArrayLike":121,"../internal/isObjectLike":128,"../object/keys":151,"./isArguments":141,"./isArray":142,"./isFunction":144,"./isString":148}],144:[function(e,t,n){function i(e){return r(e)&&s.call(e)==a}var r=e("./isObject"),a="[object Function]",o=Object.prototype,s=o.toString;t.exports=i},{"./isObject":146}],145:[function(e,t,n){function i(e){return null==e?!1:r(e)?p.test(u.call(e)):o(e)&&(a(e)?p:s).test(e)}var r=e("./isFunction"),a=e("../internal/isHostObject"),o=e("../internal/isObjectLike"),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,p=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=i},{"../internal/isHostObject":122,"../internal/isObjectLike":128,"./isFunction":144}],146:[function(e,t,n){function i(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=i},{}],147:[function(e,t,n){function i(e){var t;if(!s(e)||h.call(e)!=u||o(e)||a(e)||!p.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var n;return l.ownLast?(r(e,function(e,t,i){return n=p.call(i,t),!1}),n!==!1):(r(e,function(e,t){n=t}),void 0===n||p.call(e,n))}var r=e("../internal/baseForIn"),a=e("./isArguments"),o=e("../internal/isHostObject"),s=e("../internal/isObjectLike"),l=e("../support"),u="[object Object]",c=Object.prototype,p=c.hasOwnProperty,h=c.toString;t.exports=i},{"../internal/baseForIn":77,"../internal/isHostObject":122,"../internal/isObjectLike":128,"../support":155,"./isArguments":141}],148:[function(e,t,n){function i(e){return"string"==typeof e||r(e)&&s.call(e)==a}var r=e("../internal/isObjectLike"),a="[object String]",o=Object.prototype,s=o.toString;t.exports=i},{"../internal/isObjectLike":128}],149:[function(e,t,n){function i(e){return a(e)&&r(e.length)&&!!E[T.call(e)]}var r=e("../internal/isLength"),a=e("../internal/isObjectLike"),o="[object Arguments]",s="[object Array]",l="[object Boolean]",u="[object Date]",c="[object Error]",p="[object Function]",h="[object Map]",f="[object Number]",d="[object Object]",m="[object RegExp]",g="[object Set]",y="[object String]",v="[object WeakMap]",b="[object ArrayBuffer]",w="[object Float32Array]",x="[object Float64Array]",A="[object Int8Array]",O="[object Int16Array]",j="[object Int32Array]",_="[object Uint8Array]",S="[object Uint8ClampedArray]",k="[object Uint16Array]",C="[object Uint32Array]",E={};E[w]=E[x]=E[A]=E[O]=E[j]=E[_]=E[S]=E[k]=E[C]=!0,E[o]=E[s]=E[b]=E[l]=E[u]=E[c]=E[p]=E[h]=E[f]=E[d]=E[m]=E[g]=E[y]=E[v]=!1;var I=Object.prototype,T=I.toString;t.exports=i},{"../internal/isLength":127,"../internal/isObjectLike":128}],150:[function(e,t,n){function i(e){return void 0===e}t.exports=i},{}],151:[function(e,t,n){var i=e("../internal/getNative"),r=e("../internal/isArrayLike"),a=e("../lang/isObject"),o=e("../internal/shimKeys"),s=e("../support"),l=i(Object,"keys"),u=l?function(e){var t=null==e?void 0:e.constructor;return"function"==typeof t&&t.prototype===e||("function"==typeof e?s.enumPrototypes:r(e))?o(e):a(e)?l(e):[]}:o;t.exports=u},{"../internal/getNative":116,"../internal/isArrayLike":121,"../internal/shimKeys":136,"../lang/isObject":146,"../support":155}],152:[function(e,t,n){function i(e){if(null==e)return[];c(e)||(e=Object(e));var t=e.length;t=t&&u(t)&&(o(e)||a(e)||p(e))&&t||0;for(var n=e.constructor,i=-1,r=s(n)&&n.prototype||j,f=r===e,d=Array(t),m=t>0,y=h.enumErrorProps&&(e===O||e instanceof Error),v=h.enumPrototypes&&s(e);++i<t;)d[i]=i+"";for(var w in e)v&&"prototype"==w||y&&("message"==w||"name"==w)||m&&l(w,t)||"constructor"==w&&(f||!S.call(e,w))||d.push(w);if(h.nonEnumShadows&&e!==j){var E=e===_?x:e===O?g:k.call(e),I=C[E]||C[b];for(E==b&&(r=j),t=A.length;t--;){w=A[t];var T=I[w];f&&T||(T?!S.call(e,w):e[w]===r[w])||d.push(w)}}return d}var r=e("../internal/arrayEach"),a=e("../lang/isArguments"),o=e("../lang/isArray"),s=e("../lang/isFunction"),l=e("../internal/isIndex"),u=e("../internal/isLength"),c=e("../lang/isObject"),p=e("../lang/isString"),h=e("../support"),f="[object Array]",d="[object Boolean]",m="[object Date]",g="[object Error]",y="[object Function]",v="[object Number]",b="[object Object]",w="[object RegExp]",x="[object String]",A=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],O=Error.prototype,j=Object.prototype,_=String.prototype,S=j.hasOwnProperty,k=j.toString,C={};C[f]=C[m]=C[v]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},C[d]=C[x]={constructor:!0,toString:!0,valueOf:!0},C[g]=C[y]=C[w]={constructor:!0,toString:!0},C[b]={constructor:!0},r(A,function(e){for(var t in C)if(S.call(C,t)){var n=C[t];n[e]=S.call(n,e)}}),t.exports=i},{"../internal/arrayEach":65,"../internal/isIndex":123,"../internal/isLength":127,"../lang/isArguments":141,"../lang/isArray":142,"../lang/isFunction":144,"../lang/isObject":146,"../lang/isString":148,"../support":155}],153:[function(e,t,n){function i(e){e=a(e);for(var t=-1,n=r(e),i=n.length,o=Array(i);++t<i;){var s=n[t];o[t]=[s,e[s]]}return o}var r=e("./keys"),a=e("../internal/toObject");t.exports=i},{"../internal/toObject":137,"./keys":151}],154:[function(e,t,n){function i(e){return r(e,a(e))}var r=e("../internal/baseValues"),a=e("./keys");t.exports=i},{"../internal/baseValues":93,"./keys":151}],155:[function(e,t,n){var i=Array.prototype,r=Error.prototype,a=Object.prototype,o=a.propertyIsEnumerable,s=i.splice,l={};!function(e){var t=function(){this.x=e},n={0:e,length:e},i=[];t.prototype={valueOf:e,y:e};for(var a in new t)i.push(a);l.enumErrorProps=o.call(r,"message")||o.call(r,"name"),l.enumPrototypes=o.call(t,"prototype"),l.nonEnumShadows=!/valueOf/.test(i),l.ownLast="x"!=i[0],l.spliceObjects=(s.call(n,0,1),!n[0]),l.unindexedChars="x"[0]+Object("x")[0]!="xx"}(1,0),t.exports=l},{}],156:[function(e,t,n){function i(e){return e}t.exports=i},{}],157:[function(e,t,n){function i(){}t.exports=i},{}],158:[function(e,t,n){function i(e){return o(e)?r(e):a(e)}var r=e("../internal/baseProperty"),a=e("../internal/basePropertyDeep"),o=e("../internal/isKey");t.exports=i},{"../internal/baseProperty":88,"../internal/basePropertyDeep":89,"../internal/isKey":125}],159:[function(e,n,i){(function(e){!function(e){"use strict";if("function"==typeof bootstrap)bootstrap("promise",e);else if("object"==typeof i&&"object"==typeof n)n.exports=e();else if("function"==typeof t&&t.amd)t(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=e}else{if("undefined"==typeof window&&"undefined"==typeof self)throw new Error("This environment was not anticipated by Q. Please file a bug.");var r="undefined"!=typeof window?window:self,a=r.Q;r.Q=e(),r.Q.noConflict=function(){return r.Q=a,this}}}(function(){"use strict";function t(e){return function(){return K.apply(e,arguments)}}function n(e){return e===Object(e)}function i(e){return"[object StopIteration]"===ie(e)||e instanceof H}function r(e,t){if(V&&t.stack&&"object"==typeof e&&null!==e&&e.stack&&-1===e.stack.indexOf(re)){for(var n=[],i=t;i;i=i.source)i.stack&&n.unshift(i.stack);n.unshift(e.stack);var r=n.join("\n"+re+"\n");e.stack=a(r)}}function a(e){for(var t=e.split("\n"),n=[],i=0;i<t.length;++i){var r=t[i];l(r)||o(r)||!r||n.push(r)}return n.join("\n")}function o(e){return-1!==e.indexOf("(module.js:")||-1!==e.indexOf("(node.js:")}function s(e){var t=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e);if(t)return[t[1],Number(t[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(e);if(n)return[n[1],Number(n[2])];var i=/.*@(.+):(\d+)$/.exec(e);return i?[i[1],Number(i[2])]:void 0}function l(e){var t=s(e);if(!t)return!1;var n=t[0],i=t[1];return n===z&&i>=J&&ue>=i}function u(){if(V)try{throw new Error}catch(e){var t=e.stack.split("\n"),n=t[0].indexOf("@")>0?t[1]:t[2],i=s(n);if(!i)return;return z=i[0],i[1]}}function c(e,t,n){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t+" is deprecated, use "+n+" instead.",new Error("").stack),e.apply(e,arguments)}}function p(e){return e instanceof m?e:b(e)?C(e):k(e)}function h(){function e(e){t=e,a.source=e,X(n,function(t,n){p.nextTick(function(){e.promiseDispatch.apply(e,n)})},void 0),n=void 0,i=void 0}var t,n=[],i=[],r=ee(h.prototype),a=ee(m.prototype);if(a.promiseDispatch=function(e,r,a){var o=W(arguments);n?(n.push(o),"when"===r&&a[1]&&i.push(a[1])):p.nextTick(function(){t.promiseDispatch.apply(t,o)})},a.valueOf=function(){if(n)return a;var e=y(t);return v(e)&&(t=e),e},a.inspect=function(){return t?t.inspect():{state:"pending"}},p.longStackSupport&&V)try{throw new Error}catch(o){a.stack=o.stack.substring(o.stack.indexOf("\n")+1)}return r.promise=a,r.resolve=function(n){t||e(p(n))},r.fulfill=function(n){t||e(k(n))},r.reject=function(n){t||e(S(n))},r.notify=function(e){t||X(i,function(t,n){p.nextTick(function(){n(e)})},void 0)},r}function f(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=h();try{e(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}return t.promise}function d(e){return f(function(t,n){for(var i=0,r=e.length;r>i;i++)p(e[i]).then(t,n)})}function m(e,t,n){void 0===t&&(t=function(e){return S(new Error("Promise does not support operation: "+e))}),void 0===n&&(n=function(){return{state:"unknown"}});var i=ee(m.prototype);if(i.promiseDispatch=function(n,r,a){var o;try{o=e[r]?e[r].apply(i,a):t.call(i,r,a)}catch(s){o=S(s)}n&&n(o)},i.inspect=n,n){var r=n();"rejected"===r.state&&(i.exception=r.reason),i.valueOf=function(){var e=n();return"pending"===e.state||"rejected"===e.state?i:e.value}}return i}function g(e,t,n,i){return p(e).then(t,n,i)}function y(e){if(v(e)){var t=e.inspect();if("fulfilled"===t.state)return t.value}return e}function v(e){return e instanceof m}function b(e){return n(e)&&"function"==typeof e.then}function w(e){return v(e)&&"pending"===e.inspect().state}function x(e){return!v(e)||"fulfilled"===e.inspect().state}function A(e){return v(e)&&"rejected"===e.inspect().state}function O(){ae.length=0,oe.length=0,le||(le=!0)}function j(t,n){le&&("object"==typeof e&&"function"==typeof e.emit&&p.nextTick.runAfter(function(){-1!==G(oe,t)&&(e.emit("unhandledRejection",n,t),se.push(t))}),oe.push(t),n&&"undefined"!=typeof n.stack?ae.push(n.stack):ae.push("(no stack) "+n))}function _(t){if(le){var n=G(oe,t);-1!==n&&("object"==typeof e&&"function"==typeof e.emit&&p.nextTick.runAfter(function(){var i=G(se,t);-1!==i&&(e.emit("rejectionHandled",ae[n],t),se.splice(i,1))}),oe.splice(n,1),ae.splice(n,1))}}function S(e){var t=m({when:function(t){return t&&_(this),t?t(e):this}},function(){return this},function(){return{state:"rejected",reason:e}});return j(t,e),t}function k(e){return m({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},"delete":function(t){delete e[t]},post:function(t,n){return null===t||void 0===t?e.apply(void 0,n):e[t].apply(e,n)},apply:function(t,n){return e.apply(t,n)},keys:function(){return ne(e)}},void 0,function(){return{state:"fulfilled",value:e}})}function C(e){var t=h();return p.nextTick(function(){try{e.then(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}}),t.promise}function E(e){return m({isDef:function(){}},function(t,n){return P(e,t,n)},function(){return p(e).inspect()})}function I(e,t,n){return p(e).spread(t,n)}function T(e){return function(){function t(e,t){var o;if("undefined"==typeof StopIteration){try{o=n[e](t)}catch(s){return S(s)}return o.done?p(o.value):g(o.value,r,a)}try{o=n[e](t)}catch(s){return i(s)?p(s.value):S(s)}return g(o,r,a)}var n=e.apply(this,arguments),r=t.bind(t,"next"),a=t.bind(t,"throw");return r()}}function $(e){p.done(p.async(e)())}function U(e){throw new H(e)}function M(e){return function(){return I([this,L(arguments)],function(t,n){return e.apply(t,n)})}}function P(e,t,n){return p(e).dispatch(t,n)}function L(e){return g(e,function(e){var t=0,n=h();return X(e,function(i,r,a){var o;v(r)&&"fulfilled"===(o=r.inspect()).state?e[a]=o.value:(++t,g(r,function(i){e[a]=i,0===--t&&n.resolve(e)},n.reject,function(e){n.notify({index:a,value:e})}))},void 0),0===t&&n.resolve(e),n.promise})}function D(e){if(0===e.length)return p.resolve();var t=p.defer(),n=0;return X(e,function(i,r,a){function o(e){t.resolve(e)}function s(){n--,0===n&&t.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."))}function l(e){t.notify({index:a,value:e})}var u=e[a];n++,g(u,o,s,l)},void 0),t.promise}function R(e){return g(e,function(e){return e=Z(e,p),g(L(Z(e,function(e){return g(e,Q,Q)})),function(){return e})})}function N(e){return p(e).allSettled()}function F(e,t){return p(e).then(void 0,void 0,t)}function B(e,t){return p(e).nodeify(t)}var V=!1;try{throw new Error}catch(q){V=!!q.stack}var z,H,J=u(),Q=function(){},Y=function(){function t(){for(var e,t;i.next;)i=i.next,e=i.task,i.task=void 0,t=i.domain,t&&(i.domain=void 0,t.enter()),n(e,t);for(;l.length;)e=l.pop(),n(e);a=!1}function n(e,n){try{e()}catch(i){if(s)throw n&&n.exit(),setTimeout(t,0),n&&n.enter(),i;setTimeout(function(){throw i},0)}n&&n.exit()}var i={task:void 0,next:null},r=i,a=!1,o=void 0,s=!1,l=[];if(Y=function(t){r=r.next={task:t,domain:s&&e.domain,next:null},a||(a=!0,o())},"object"==typeof e&&"[object process]"===e.toString()&&e.nextTick)s=!0,o=function(){e.nextTick(t)};else if("function"==typeof setImmediate)o="undefined"!=typeof window?setImmediate.bind(window,t):function(){setImmediate(t)};else if("undefined"!=typeof MessageChannel){var u=new MessageChannel;u.port1.onmessage=function(){o=c,u.port1.onmessage=t,t()};var c=function(){u.port2.postMessage(0)};o=function(){setTimeout(t,0),c()}}else o=function(){setTimeout(t,0)};return Y.runAfter=function(e){l.push(e),a||(a=!0,o())},Y}(),K=Function.call,W=t(Array.prototype.slice),X=t(Array.prototype.reduce||function(e,t){var n=0,i=this.length;if(1===arguments.length)for(;;){if(n in this){t=this[n++];break}if(++n>=i)throw new TypeError}for(;i>n;n++)n in this&&(t=e(t,this[n],n));return t}),G=t(Array.prototype.indexOf||function(e){for(var t=0;t<this.length;t++)if(this[t]===e)return t;return-1}),Z=t(Array.prototype.map||function(e,t){var n=this,i=[];return X(n,function(r,a,o){i.push(e.call(t,a,o,n))},void 0),i}),ee=Object.create||function(e){function t(){}return t.prototype=e,new t},te=t(Object.prototype.hasOwnProperty),ne=Object.keys||function(e){var t=[];for(var n in e)te(e,n)&&t.push(n);return t},ie=t(Object.prototype.toString);H="undefined"!=typeof ReturnValue?ReturnValue:function(e){this.value=e};var re="From previous event:";p.resolve=p,p.nextTick=Y,p.longStackSupport=!1,"object"==typeof e&&e&&e.env&&e.env.Q_DEBUG&&(p.longStackSupport=!0),p.defer=h,h.prototype.makeNodeResolver=function(){var e=this;return function(t,n){t?e.reject(t):arguments.length>2?e.resolve(W(arguments,1)):e.resolve(n)}},p.Promise=f,p.promise=f,f.race=d,f.all=L,f.reject=S,f.resolve=p,p.passByCopy=function(e){return e},m.prototype.passByCopy=function(){return this},p.join=function(e,t){return p(e).join(t)},m.prototype.join=function(e){return p([this,e]).spread(function(e,t){if(e===t)return e;throw new Error("Can't join: not the same: "+e+" "+t)})},p.race=d,m.prototype.race=function(){return this.then(p.race)},p.makePromise=m,m.prototype.toString=function(){return"[object Promise]"},m.prototype.then=function(e,t,n){function i(t){try{return"function"==typeof e?e(t):t}catch(n){return S(n)}}function a(e){if("function"==typeof t){r(e,s);try{return t(e)}catch(n){return S(n)}}return S(e)}function o(e){return"function"==typeof n?n(e):e}var s=this,l=h(),u=!1;return p.nextTick(function(){s.promiseDispatch(function(e){u||(u=!0,l.resolve(i(e)))},"when",[function(e){u||(u=!0,l.resolve(a(e)))}])}),s.promiseDispatch(void 0,"when",[void 0,function(e){var t,n=!1;try{t=o(e)}catch(i){if(n=!0,!p.onerror)throw i;p.onerror(i)}n||l.notify(t)}]),l.promise},p.tap=function(e,t){return p(e).tap(t)},m.prototype.tap=function(e){return e=p(e),this.then(function(t){return e.fcall(t).thenResolve(t)})},p.when=g,m.prototype.thenResolve=function(e){return this.then(function(){return e})},p.thenResolve=function(e,t){return p(e).thenResolve(t)},m.prototype.thenReject=function(e){return this.then(function(){throw e})},p.thenReject=function(e,t){return p(e).thenReject(t)},p.nearer=y,p.isPromise=v,p.isPromiseAlike=b,p.isPending=w,m.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=x,m.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=A,m.prototype.isRejected=function(){return"rejected"===this.inspect().state};var ae=[],oe=[],se=[],le=!0;p.resetUnhandledRejections=O,p.getUnhandledReasons=function(){return ae.slice()},p.stopUnhandledRejectionTracking=function(){O(),le=!1},O(),p.reject=S,p.fulfill=k,p.master=E,p.spread=I,m.prototype.spread=function(e,t){return this.all().then(function(t){return e.apply(void 0,t)},t)},p.async=T,p.spawn=$,p["return"]=U,p.promised=M,p.dispatch=P,m.prototype.dispatch=function(e,t){var n=this,i=h();return p.nextTick(function(){n.promiseDispatch(i.resolve,e,t)}),i.promise},p.get=function(e,t){return p(e).dispatch("get",[t])},m.prototype.get=function(e){return this.dispatch("get",[e])},p.set=function(e,t,n){return p(e).dispatch("set",[t,n])},m.prototype.set=function(e,t){return this.dispatch("set",[e,t])},p.del=p["delete"]=function(e,t){return p(e).dispatch("delete",[t])},m.prototype.del=m.prototype["delete"]=function(e){return this.dispatch("delete",[e])},p.mapply=p.post=function(e,t,n){return p(e).dispatch("post",[t,n])},m.prototype.mapply=m.prototype.post=function(e,t){return this.dispatch("post",[e,t])},p.send=p.mcall=p.invoke=function(e,t){return p(e).dispatch("post",[t,W(arguments,2)])},m.prototype.send=m.prototype.mcall=m.prototype.invoke=function(e){return this.dispatch("post",[e,W(arguments,1)])},p.fapply=function(e,t){return p(e).dispatch("apply",[void 0,t])},m.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},p["try"]=p.fcall=function(e){return p(e).dispatch("apply",[void 0,W(arguments,1)])},m.prototype.fcall=function(){return this.dispatch("apply",[void 0,W(arguments)])},p.fbind=function(e){var t=p(e),n=W(arguments,1);return function(){return t.dispatch("apply",[this,n.concat(W(arguments))])}},m.prototype.fbind=function(){var e=this,t=W(arguments);return function(){return e.dispatch("apply",[this,t.concat(W(arguments))])}},p.keys=function(e){return p(e).dispatch("keys",[])},m.prototype.keys=function(){return this.dispatch("keys",[])},p.all=L,m.prototype.all=function(){return L(this)},p.any=D,m.prototype.any=function(){return D(this)},p.allResolved=c(R,"allResolved","allSettled"),m.prototype.allResolved=function(){return R(this)},p.allSettled=N,m.prototype.allSettled=function(){return this.then(function(e){return L(Z(e,function(e){function t(){return e.inspect()}return e=p(e),e.then(t,t)}))})},p.fail=p["catch"]=function(e,t){return p(e).then(void 0,t)},m.prototype.fail=m.prototype["catch"]=function(e){return this.then(void 0,e)},p.progress=F,m.prototype.progress=function(e){return this.then(void 0,void 0,e)},p.fin=p["finally"]=function(e,t){return p(e)["finally"](t)},m.prototype.fin=m.prototype["finally"]=function(e){return e=p(e),this.then(function(t){return e.fcall().then(function(){return t})},function(t){return e.fcall().then(function(){throw t})})},p.done=function(e,t,n,i){return p(e).done(t,n,i)},m.prototype.done=function(t,n,i){var a=function(e){p.nextTick(function(){if(r(e,o),!p.onerror)throw e;p.onerror(e)})},o=t||n||i?this.then(t,n,i):this;"object"==typeof e&&e&&e.domain&&(a=e.domain.bind(a)),o.then(void 0,a)},p.timeout=function(e,t,n){return p(e).timeout(t,n)},m.prototype.timeout=function(e,t){var n=h(),i=setTimeout(function(){t&&"string"!=typeof t||(t=new Error(t||"Timed out after "+e+" ms"),t.code="ETIMEDOUT"),n.reject(t)},e);return this.then(function(e){clearTimeout(i),n.resolve(e)},function(e){clearTimeout(i),n.reject(e)},n.notify),n.promise},p.delay=function(e,t){return void 0===t&&(t=e,e=void 0),p(e).delay(t)},m.prototype.delay=function(e){return this.then(function(t){var n=h();return setTimeout(function(){n.resolve(t)},e),n.promise})},p.nfapply=function(e,t){return p(e).nfapply(t)},m.prototype.nfapply=function(e){var t=h(),n=W(e);return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},p.nfcall=function(e){var t=W(arguments,1);return p(e).nfapply(t)},m.prototype.nfcall=function(){var e=W(arguments),t=h();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},p.nfbind=p.denodeify=function(e){var t=W(arguments,1);\r
+return function(){var n=t.concat(W(arguments)),i=h();return n.push(i.makeNodeResolver()),p(e).fapply(n).fail(i.reject),i.promise}},m.prototype.nfbind=m.prototype.denodeify=function(){var e=W(arguments);return e.unshift(this),p.denodeify.apply(void 0,e)},p.nbind=function(e,t){var n=W(arguments,2);return function(){function i(){return e.apply(t,arguments)}var r=n.concat(W(arguments)),a=h();return r.push(a.makeNodeResolver()),p(i).fapply(r).fail(a.reject),a.promise}},m.prototype.nbind=function(){var e=W(arguments,0);return e.unshift(this),p.nbind.apply(void 0,e)},p.nmapply=p.npost=function(e,t,n){return p(e).npost(t,n)},m.prototype.nmapply=m.prototype.npost=function(e,t){var n=W(t||[]),i=h();return n.push(i.makeNodeResolver()),this.dispatch("post",[e,n]).fail(i.reject),i.promise},p.nsend=p.nmcall=p.ninvoke=function(e,t){var n=W(arguments,2),i=h();return n.push(i.makeNodeResolver()),p(e).dispatch("post",[t,n]).fail(i.reject),i.promise},m.prototype.nsend=m.prototype.nmcall=m.prototype.ninvoke=function(e){var t=W(arguments,1),n=h();return t.push(n.makeNodeResolver()),this.dispatch("post",[e,t]).fail(n.reject),n.promise},p.nodeify=B,m.prototype.nodeify=function(e){return e?void this.then(function(t){p.nextTick(function(){e(null,t)})},function(t){p.nextTick(function(){e(t)})}):this},p.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var ue=u();return p})}).call(this,e("_process"))},{_process:13}],160:[function(e,t,n){t.exports=function(e,t,n){for(var i=0,r=e.length,a=3==arguments.length?n:e[i++];r>i;)a=t.call(null,a,e[i],++i,e);return a}},{}],161:[function(e,t,n){function i(){}function r(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function a(e){return e===Object(e)}function o(e){if(!a(e))return e;var t=[];for(var n in e)null!=e[n]&&s(t,n,e[n]);return t.join("&")}function s(e,t,n){return Array.isArray(n)?n.forEach(function(n){s(e,t,n)}):void e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}function l(e){for(var t,n,i={},r=e.split("&"),a=0,o=r.length;o>a;++a)n=r[a],t=n.split("="),i[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return i}function u(e){var t,n,i,r,a=e.split(/\r?\n/),o={};a.pop();for(var s=0,l=a.length;l>s;++s)n=a[s],t=n.indexOf(":"),i=n.slice(0,t).toLowerCase(),r=w(n.slice(t+1)),o[i]=r;return o}function c(e){return/[\/+]json\b/.test(e)}function p(e){return e.split(/ *; */).shift()}function h(e){return b(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),i=n.shift(),r=n.shift();return i&&r&&(e[i]=r),e},{})}function f(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=u(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function d(e,t){var n=this;v.call(this),this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new f(n)}catch(i){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=i,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var r=new Error(t.statusText||"Unsuccessful HTTP response");r.original=e,r.response=t,r.status=t.status,n.callback(r,t)})}function m(e,t){return"function"==typeof t?new d("GET",e).end(t):1==arguments.length?new d("GET",e):new d(e,t)}function g(e,t){var n=m("DELETE",e);return t&&n.end(t),n}var y,v=e("emitter"),b=e("reduce");y="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,m.getXHR=function(){if(!(!y.XMLHttpRequest||y.location&&"file:"==y.location.protocol&&y.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var w="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};m.serializeObject=o,m.parseString=l,m.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},m.serialize={"application/x-www-form-urlencoded":o,"application/json":JSON.stringify},m.parse={"application/x-www-form-urlencoded":l,"application/json":JSON.parse},f.prototype.get=function(e){return this.header[e.toLowerCase()]},f.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=p(t);var n=h(t);for(var i in n)this[i]=n[i]},f.prototype.parseBody=function(e){var t=m.parse[this.type];return t&&e&&(e.length||e instanceof Object)?t(e):null},f.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},f.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,i="cannot "+t+" "+n+" ("+this.status+")",r=new Error(i);return r.status=this.status,r.method=t,r.url=n,r},m.Response=f,v(d.prototype),d.prototype.use=function(e){return e(this),this},d.prototype.timeout=function(e){return this._timeout=e,this},d.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},d.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},d.prototype.set=function(e,t){if(a(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},d.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},d.prototype.getHeader=function(e){return this._header[e.toLowerCase()]},d.prototype.type=function(e){return this.set("Content-Type",m.types[e]||e),this},d.prototype.parse=function(e){return this._parser=e,this},d.prototype.accept=function(e){return this.set("Accept",m.types[e]||e),this},d.prototype.auth=function(e,t){var n=btoa(e+":"+t);return this.set("Authorization","Basic "+n),this},d.prototype.query=function(e){return"string"!=typeof e&&(e=o(e)),e&&this._query.push(e),this},d.prototype.field=function(e,t){return this._formData||(this._formData=new y.FormData),this._formData.append(e,t),this},d.prototype.attach=function(e,t,n){return this._formData||(this._formData=new y.FormData),this._formData.append(e,t,n||t.name),this},d.prototype.send=function(e){var t=a(e),n=this.getHeader("Content-Type");if(t&&a(this._data))for(var i in e)this._data[i]=e[i];else"string"==typeof e?(n||this.type("form"),n=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||r(e)?this:(n||this.type("json"),this)},d.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},d.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},d.prototype.withCredentials=function(){return this._withCredentials=!0,this},d.prototype.end=function(e){var t=this,n=this.xhr=m.getXHR(),a=this._query.join("&"),o=this._timeout,s=this._formData||this._data;this._callback=e||i,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(i){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var l=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),e.direction="download",t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=l);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=l)}catch(u){}if(o&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},o)),a&&(a=m.serializeObject(a),this.url+=~this.url.indexOf("?")?"&"+a:"?"+a),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!r(s)){var p=this.getHeader("Content-Type"),h=this._parser||m.serialize[p?p.split(";")[0]:""];!h&&c(p)&&(h=m.serialize["application/json"]),h&&(s=h(s))}for(var f in this.header)null!=this.header[f]&&n.setRequestHeader(f,this.header[f]);return this.emit("request",this),n.send("undefined"!=typeof s?s:null),this},d.prototype.then=function(e,t){return this.end(function(n,i){n?t(n):e(i)})},m.Request=d,m.get=function(e,t,n){var i=m("GET",e);return"function"==typeof t&&(n=t,t=null),t&&i.query(t),n&&i.end(n),i},m.head=function(e,t,n){var i=m("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},m.del=g,m["delete"]=g,m.patch=function(e,t,n){var i=m("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},m.post=function(e,t,n){var i=m("POST",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},m.put=function(e,t,n){var i=m("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&i.send(t),n&&i.end(n),i},t.exports=m},{emitter:19,reduce:160}]},{},[1])(1)}),window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},"model"!==e.defaultModelRendering&&(e.defaultModelRendering="schema"),e.highlightSizeThreshold||(e.highlightSizeThreshold=1e5),e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),"string"==typeof e.oauth2RedirectUrl&&(window.oAuthRedirectUrl=e.redirectUrl),$("#"+this.dom_id).length||$("body").append('<div id="'+this.dom_id+'"></div>'),this.options=e,marked.setOptions({gfm:!0});var t=this;this.options.success=function(){return t.render()},this.options.progress=function(e){return t.showMessage(e)},this.options.failure=function(e){return t.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return t.updateSwaggerUi(e)}),JSONEditor.defaults.iconlibs.swagger=JSONEditor.AbstractIconLib.extend({mapping:{collapse:"collapse",expand:"expand"},icon_prefix:"swagger-"})},setOption:function(e,t){this.options[e]=t},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear(),this.authView&&this.authView.remove();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.api&&(this.options.authorizations=this.api.clientAuthorizations.authz),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){var e;switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),_.isEmpty(this.api.securityDefinitions)||(e=_.map(this.api.securityDefinitions,function(e,t){var n={};return n[t]=e,n}),this.authView=new SwaggerUi.Views.AuthButtonView({data:SwaggerUi.utils.parseSecurityDefinitions(e),router:this}),$("#auth_container").append(this.authView.render().el)),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,t){if(0===t.indexOf("/")){var n=e.split("/");return e=n[0]+"//"+n[2],e+t}var i=e.length;return e.indexOf("?")>-1&&(i=Math.min(i,e.indexOf("?"))),e.indexOf("#")>-1&&(i=Math.min(i,e.indexOf("#"))),e=e.substring(0,i),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t},showMessage:function(e){void 0===e&&(e="");var t=$("#message-bar");t.removeClass("message-fail"),t.addClass("message-success"),t.text(e),window.SwaggerTranslator&&window.SwaggerTranslator.translate(t)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var t=$("#message-bar").text(e);return this.options.onFailure&&this.options.onFailure(e),t},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))}),$(".propDesc",".model-signature .description").each(function(){$(this).html(marked($(this).html())).addClass("markdown")})}}),window.SwaggerUi.Views={},window.SwaggerUi.Models={},window.SwaggerUi.Collections={},window.SwaggerUi.partials={},window.SwaggerUi.utils={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),function(e,t){"function"==typeof define&&define.amd?define(["b"],function(n){return e.SwaggerUi=t(n)}):"object"==typeof exports?module.exports=t(require("b")):e.SwaggerUi=t(e.b)}(this,function(){return SwaggerUi}),window.SwaggerUi.utils={parseSecurityDefinitions:function(e){var t=Object.assign({},window.swaggerUi.api.authSchemes||window.swaggerUi.api.securityDefinitions),n=[],i=[],r=[],a=window.SwaggerUi.utils;return Array.isArray(e)?(e.forEach(function(e){var o={},s={};for(var l in e)if(Array.isArray(e[l])){if(!t[l])continue;if(t[l]=t[l]||{},"oauth2"===t[l].type){s[l]=Object.assign({},t[l]);for(var u in s[l].scopes)e[l].indexOf(u)<0&&delete s[l].scopes[u];s[l].scopes=a.parseOauth2Scopes(s[l].scopes),r=_.merge(r,s[l].scopes)}else o[l]=Object.assign({},t[l])}else"oauth2"===e[l].type?(s[l]=Object.assign({},e[l]),s[l].scopes=a.parseOauth2Scopes(s[l].scopes),r=_.merge(r,s[l].scopes)):o[l]=e[l];_.isEmpty(o)||i.push(o),_.isEmpty(s)||n.push(s)}),{auths:i,oauth2:n,scopes:r}):null},parseOauth2Scopes:function(e){var t,n=Object.assign({},e),i=[];for(t in n)i.push({scope:t,description:n[t]});return i}},SwaggerUi.Models.ApiKeyAuthModel=Backbone.Model.extend({defaults:{"in":"",name:"",title:"",value:""},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("value");return this.set("valid",e),e}}),SwaggerUi.Views.ApiKeyAuthView=Backbone.View.extend({events:{"change .input_apiKey_entry":"apiKeyChange"},selectors:{apikeyInput:".input_apiKey_entry"},template:Handlebars.templates.apikey_auth,initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){return this.$el.html(this.template(this.model.toJSON())),this},apiKeyChange:function(e){var t=$(e.target).val();t&&this.$(this.selectors.apikeyInput).removeClass("error"),this.model.set("value",t)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.isValid()||this.$(this.selectors.apikeyInput).addClass("error")}}),SwaggerUi.Views.AuthButtonView=Backbone.View.extend({events:{"click .authorize__btn":"authorizeBtnClick"},tpls:{popup:Handlebars.templates.popup,authBtn:Handlebars.templates.auth_button,authBtnOperation:Handlebars.templates.auth_button_operation},initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.isOperation=this.options.isOperation,this.model=this.model||{},this.router=this.options.router,this.auths=this.options.data.oauth2.concat(this.options.data.auths)},render:function(){var e=this.isOperation?"authBtnOperation":"authBtn";return this.$authEl=this.renderAuths(this.auths),this.$el.html(this.tpls[e](this.model)),this},authorizeBtnClick:function(e){var t;e.preventDefault(),t={title:"Available authorizations",content:this.$authEl},this.popup=new SwaggerUi.Views.PopupView({model:t}),this.popup.render()},renderAuths:function(e){var t=$("<div>"),n=!1;return e.forEach(function(e){var i=new SwaggerUi.Views.AuthView({data:e,router:this.router}),r=i.render().el;t.append(r),i.isLogout&&(n=!0)},this),this.model.isLogout=n,t}}),SwaggerUi.Collections.AuthsCollection=Backbone.Collection.extend({constructor:function(){var e=Array.prototype.slice.call(arguments);e[0]=this.parse(e[0]),Backbone.Collection.apply(this,e)},add:function(e){var t=Array.prototype.slice.call(arguments);Array.isArray(e)?t[0]=_.map(e,function(e){return this.handleOne(e)},this):t[0]=this.handleOne(e),Backbone.Collection.prototype.add.apply(this,t)},handleOne:function(e){var t=e;if(!(e instanceof Backbone.Model))switch(e.type){case"oauth2":t=new SwaggerUi.Models.Oauth2Model(e);break;case"basic":t=new SwaggerUi.Models.BasicAuthModel(e);break;case"apiKey":t=new SwaggerUi.Models.ApiKeyAuthModel(e);break;default:t=new Backbone.Model(e)}return t},isValid:function(){var e=!0;return this.models.forEach(function(t){t.validate()||(e=!1)}),e},isAuthorized:function(){return this.length===this.where({isLogout:!0}).length},isPartiallyAuthorized:function(){return this.where({isLogout:!0}).length>0},parse:function(e){var t=Object.assign({},window.swaggerUi.api.clientAuthorizations.authz);return _.map(e,function(e,n){var i=t.basic&&"basic"===e.type;return _.extend(e,{title:n}),(t[n]||i)&&_.extend(e,{isLogout:!0,value:i?void 0:t[n].value,username:i?t.basic.username:void 0,password:i?t.basic.password:void 0,valid:!0}),e})}}),SwaggerUi.Views.AuthsCollectionView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.options.data=this.options.data||{},this.router=this.options.router,this.collection=new SwaggerUi.Collections.AuthsCollection(e.data),this.$innerEl=$("<div>"),this.authViews=[]},render:function(){return this.collection.each(function(e){this.renderOneAuth(e)},this),this.$el.html(this.$innerEl.html()?this.$innerEl:""),this},renderOneAuth:function(e){var t,n,i,r=e.get("type");"apiKey"===r?i="ApiKeyAuthView":"basic"===r&&0===this.$innerEl.find(".basic_auth_container").length?i="BasicAuthView":"oauth2"===r&&(i="Oauth2View"),i&&(n=new SwaggerUi.Views[i]({model:e,router:this.router}),t=n.render().el,this.authViews.push(n)),this.$innerEl.append(t)},highlightInvalid:function(){this.authViews.forEach(function(e){e.highlightInvalid()},this)}}),SwaggerUi.Views.AuthView=Backbone.View.extend({events:{"click .auth_submit__button":"authorizeClick","click .auth_logout__button":"logoutClick"},tpls:{main:Handlebars.templates.auth_view},selectors:{innerEl:".auth_inner",authBtn:".auth_submit__button"},initialize:function(e){this.options=e||{},e.data=e.data||{},this.router=this.options.router,this.authsCollectionView=new SwaggerUi.Views.AuthsCollectionView({data:e.data}),this.$el.html(this.tpls.main({isLogout:this.authsCollectionView.collection.isAuthorized(),isAuthorized:this.authsCollectionView.collection.isPartiallyAuthorized()})),this.$innerEl=this.$(this.selectors.innerEl),this.isLogout=this.authsCollectionView.collection.isPartiallyAuthorized()},render:function(){return this.$innerEl.html(this.authsCollectionView.render().el),this},authorizeClick:function(e){e.preventDefault(),e.stopPropagation(),this.authsCollectionView.collection.isValid()?this.authorize():this.authsCollectionView.highlightInvalid()},authorize:function(){this.authsCollectionView.collection.forEach(function(e){var t,n,i=e.get("type");"apiKey"===i?(t=new SwaggerClient.ApiKeyAuthorization(e.get("name"),e.get("value"),e.get("in")),this.router.api.clientAuthorizations.add(e.get("title"),t)):"basic"===i?(n=new SwaggerClient.PasswordAuthorization(e.get("username"),e.get("password")),this.router.api.clientAuthorizations.add(e.get("type"),n)):"oauth2"===i&&this.handleOauth2Login(e)},this),this.router.load()},logoutClick:function(e){e.preventDefault(),this.authsCollectionView.collection.forEach(function(e){var t="basic"===e.get("type")?"basic":e.get("title");window.swaggerUi.api.clientAuthorizations.remove(t)}),this.router.load()},handleOauth2Login:function(e){var t,n,i,r=window.location,a=location.pathname.substring(0,location.pathname.lastIndexOf("/")),o=r.protocol+"//"+r.host+a+"/o2c.html",s=window.oAuthRedirectUrl||o,l=null,u=_.map(e.get("scopes"),function(e){return e.scope});window.OAuthSchemeKey=e.get("title"),window.enabledScopes=u;var c=e.get("flow");if("oauth2"!==e.get("type")||!c||"implicit"!==c&&"accessCode"!==c){if("oauth2"===e.get("type")&&c&&"application"===c)return n=e.attributes,window.swaggerUi.tokenName=n.tokenName||"access_token",void this.clientCredentialsFlow(u,n.tokenUrl,window.OAuthSchemeKey);if(e.get("grantTypes")){var p=e.get("grantTypes");for(var h in p)p.hasOwnProperty(h)&&"implicit"===h?(n=p[h],i=n.loginEndpoint.url,l=n.loginEndpoint.url+"?response_type=token",window.swaggerUi.tokenName=n.tokenName):p.hasOwnProperty(h)&&"accessCode"===h&&(n=p[h],i=n.tokenRequestEndpoint.url,l=n.tokenRequestEndpoint.url+"?response_type=code",window.swaggerUi.tokenName=n.tokenName)}}else n=e.attributes,l=n.authorizationUrl+"?response_type="+("implicit"===c?"token":"code"),window.swaggerUi.tokenName=n.tokenName||"access_token",window.swaggerUi.tokenUrl="accessCode"===c?n.tokenUrl:null,t=window.OAuthSchemeKey;l+="&redirect_uri="+encodeURIComponent(s),l+="&realm="+encodeURIComponent(realm),l+="&client_id="+encodeURIComponent(clientId),l+="&scope="+encodeURIComponent(u.join(scopeSeparator)),l+="&state="+encodeURIComponent(t);for(var f in additionalQueryStringParams)l+="&"+f+"="+encodeURIComponent(additionalQueryStringParams[f]);window.open(l)},clientCredentialsFlow:function(e,t,n){var i={client_id:clientId,client_secret:clientSecret,scope:e.join(" "),grant_type:"client_credentials"};$.ajax({url:t,type:"POST",data:i,success:function(e){onOAuthComplete(e,n)},error:function(){onOAuthComplete("")}})}}),SwaggerUi.Models.BasicAuthModel=Backbone.Model.extend({defaults:{username:"",password:"",title:"basic"},initialize:function(){this.on("change",this.validate)},validate:function(){var e=!!this.get("password")&&!!this.get("username");return this.set("valid",e),e}}),SwaggerUi.Views.BasicAuthView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},events:{"change .auth_input":"inputChange"},selectors:{usernameInput:".basic_auth__username",passwordInput:".basic_auth__password"},cls:{error:"error"},template:Handlebars.templates.basic_auth,render:function(){return $(this.el).html(this.template(this.model.toJSON())),this},inputChange:function(e){var t=$(e.target),n=t.val(),i=t.prop("name");n&&t.removeClass(this.cls.error),this.model.set(i,n)},isValid:function(){return this.model.validate()},highlightInvalid:function(){this.model.get("username")||this.$(this.selectors.usernameInput).addClass(this.cls.error),this.model.get("password")||this.$(this.selectors.passwordInput).addClass(this.cls.error)}}),SwaggerUi.Views.ContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.contentTypeId="ct"+Math.random(),$(this.el).html(Handlebars.templates.content_type(this.model)),this}}),SwaggerUi.Views.HeaderView=Backbone.View.extend({events:{"click #show-pet-store-icon":"showPetStore","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},initialize:function(){},showPetStore:function(){this.trigger("update-swagger-ui",{url:"http://petstore.swagger.io/v2/swagger.json"})},showCustomOnKeyup:function(e){13===e.keyCode&&this.showCustom()},showCustom:function(e){e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val()})},update:function(e,t,n){void 0===n&&(n=!1),$("#input_baseUrl").val(e),n&&this.trigger("update-swagger-ui",{url:e})}}),SwaggerUi.Views.MainView=Backbone.View.extend({apisSorter:{alpha:function(e,t){return e.name.localeCompare(t.name)}},operationsSorters:{alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},initialize:function(e){var t,n,i,r;if(e=e||{},this.router=e.router,e.swaggerOptions.apisSorter&&(t=e.swaggerOptions.apisSorter,n=_.isFunction(t)?t:this.apisSorter[t],_.isFunction(n)&&this.model.apisArray.sort(n)),e.swaggerOptions.operationsSorter&&(t=e.swaggerOptions.operationsSorter,n=_.isFunction(t)?t:this.operationsSorters[t],_.isFunction(n)))for(i in this.model.apisArray)this.model.apisArray[i].operationsArray.sort(n);this.model.auths=[];for(i in this.model.securityDefinitions)r=this.model.securityDefinitions[i],this.model.auths.push({name:i,type:r.type,value:r});"validatorUrl"in e.swaggerOptions?this.model.validatorUrl=e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0||this.model.url.indexOf("127.0.0.1")>0?this.model.validatorUrl=null:"https:"===window.location.protocol?this.model.validatorUrl="https://online.swagger.io/validator":this.model.validatorUrl="http://online.swagger.io/validator";var a;for(a in this.model.definitions)this.model.definitions[a].type||(this.model.definitions[a].type="object")},render:function(){$(this.el).html(Handlebars.templates.main(this.model)),this.info=this.$(".info")[0],this.info&&this.info.addEventListener("click",this.onLinkClick,!0),this.model.securityDefinitions=this.model.securityDefinitions||{};for(var e={},t=0,n=0;n<this.model.apisArray.length;n++){for(var i=this.model.apisArray[n],r=i.name;"undefined"!=typeof e[r];)r=r+"_"+t,t+=1;i.id=r,e[r]=i,this.addResource(i,this.model.auths)}return $(".propWrap").hover(function(){$(".optionsWrapper",$(this)).show()},function(){$(".optionsWrapper",$(this)).hide()}),this},addResource:function(e,t){e.id=e.id.replace(/\s/g,"_"),e.definitions=this.model.definitions;var n=new SwaggerUi.Views.ResourceView({model:e,router:this.router,tagName:"li",id:"resource_"+e.id,className:"resource",auths:t,swaggerOptions:this.options.swaggerOptions});$("#resources",this.el).append(n.render().el)},clear:function(){$(this.el).html("")},onLinkClick:function(e){var t=e.target;"A"===t.tagName&&t.href&&!t.target&&(e.preventDefault(),window.open(t.href,"_blank"))}}),SwaggerUi.Models.Oauth2Model=Backbone.Model.extend({defaults:{scopes:{}},initialize:function(){this.on("change",this.validate)},setScopes:function(e,t){var n=_.extend({},this.attributes),i=_.findIndex(n.scopes,function(t){return t.scope===e});n.scopes[i].checked=t,this.set(n),this.validate()},validate:function(){var e=_.findIndex(this.get("scopes"),function(e){return e.checked===!0})>-1;return this.set("valid",e),e}}),SwaggerUi.Views.Oauth2View=Backbone.View.extend({events:{"change .oauth-scope":"scopeChange"},template:Handlebars.templates.oauth2,render:function(){return this.$el.html(this.template(this.model.toJSON())),this},scopeChange:function(e){var t=$(e.target).prop("checked"),n=$(e.target).data("scope");this.model.setScopes(n,t)}}),SwaggerUi.Views.OperationView=Backbone.View.extend({invocationUrl:null,events:{"submit .sandbox":"submitOperation","click .submit":"submitOperation","click .response_hider":"hideResponse","click .toggleOperation":"toggleOperationContent","mouseenter .api-ic":"mouseEnter","dblclick .curl":"selectText","change [name=responseContentType]":"showSnippet"},initialize:function(e){return e=e||{},this.router=e.router,this.auths=e.auths,this.parentId=this.model.parentId,this.nickname=this.model.nickname,this.model.encodedParentId=encodeURIComponent(this.parentId),e.swaggerOptions&&(this.model.defaultRendering=e.swaggerOptions.defaultModelRendering,e.swaggerOptions.showRequestHeaders&&(this.model.showRequestHeaders=!0)),this},selectText:function(e){var t,n,i=document,r=e.target.firstChild;i.body.createTextRange?(t=document.body.createTextRange(),t.moveToElementText(r),t.select()):window.getSelection&&(n=window.getSelection(),t=document.createRange(),t.selectNodeContents(r),n.removeAllRanges(),n.addRange(t))},mouseEnter:function(e){var t=$(this.el).find(".content"),n=e.pageX,i=e.pageY,r=$(window).scrollLeft(),a=$(window).scrollTop(),o=r+$(window).width(),s=a+$(window).height(),l=t.width(),u=t.height();n+l>o&&(n=o-l),r>n&&(n=r),i+u>s&&(i=s-u),a>i&&(i=a);var c={};c.top=i,c.left=n,t.css(c)},render:function(){var e,t,n,i,r,a,o,s,l,u,c,p,h,f,d,m,g,y,v,b,w,x,A,O,j,S,k,C,E,I,T,U,M,P,L,D,R,N,F,B,V;if(a=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,a||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.oauth=null,m=this.model.authorizations||this.model.security)if(Array.isArray(m))for(l=0,u=m.length;u>l;l++){n=m[l];for(s in n)for(e in this.auths)if(t=this.auths[e],s===t.name&&"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],A=t.value.scopes;for(o in A)R=A[o],U=n[s].indexOf(o),U>=0&&(y={scope:o,description:R},this.model.oauth.scopes.push(y))}}else for(o in m)if(R=m[o],"oauth2"===o)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),d=0,c=R.length;c>d;d++)y=R[d],this.model.oauth.scopes.push(y);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],O=this.model.responses;for(i in O)N=O[i],I=null,T=this.model.responses[i].schema,T&&T.$ref&&(I=T.$ref,-1!==I.indexOf("#/definitions/")&&(I=I.replace(/^.*#\/definitions\//,""))),this.model.responseMessages.push({code:i,message:N.description,responseModel:I,headers:N.headers,schema:T})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),M=null,F=this.model.produces,B=this.contains(F,"xml"),V=B?this.contains(F,"json"):!0,this.model.successResponse){L=this.model.successResponse;for(s in L)N=L[s],this.model.successCode=s,"object"==typeof N&&"function"==typeof N.createJSONSample?(this.model.successDescription=N.description,this.model.headers=this.parseResponseHeaders(N.headers),M={sampleJSON:V?JSON.stringify(SwaggerUi.partials.signature.createJSONSample(N),void 0,2):!1,isParam:!1,sampleXML:B?SwaggerUi.partials.signature.createXMLSample(N.name,N.definition,N.models):!1,signature:SwaggerUi.partials.signature.getModelSignature(N.name,N.definition,N.models,N.modelPropertyMacro)}):M={signature:SwaggerUi.partials.signature.getPrimitiveSignature(N)}}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(M={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),M?(M.defaultRendering=this.model.defaultRendering,E=new SwaggerUi.Views.SignatureView({model:M,router:this.router,tagName:"div"}),$(".model-signature",$(this.el)).append(E.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),\r
+r={isParam:!1},r.consumes=this.model.consumes,r.produces=this.model.produces,j=this.model.parameters,g=0,p=j.length;p>g;g++)b=j[g],D=b.type||b.dataType||"","undefined"==typeof D&&(I=b.schema,I&&I.$ref&&(x=I.$ref,D=0===x.indexOf("#/definitions/")?x.substring("#/definitions/".length):x)),D&&"file"===D.toLowerCase()&&(r.consumes||(r.consumes="multipart/form-data")),b.type=D;for(C=new SwaggerUi.Views.ResponseContentTypeView({model:r,router:this.router}),$(".response-content-type",$(this.el)).append(C.render().el),S=this.model.parameters,v=0,h=S.length;h>v;v++)b=S[v],this.addParameter(b,r.consumes);for(k=this.model.responseMessages,w=0,f=k.length;f>w;w++)P=k[w],P.isXML=B,P.isJSON=V,_.isUndefined(P.headers)||(P.headers=this.parseHeadersType(P.headers)),this.addStatusCode(P);if(Array.isArray(this.model.security)){var q=SwaggerUi.utils.parseSecurityDefinitions(this.model.security);q.isLogout=!_.isEmpty(window.swaggerUi.api.clientAuthorizations.authz),this.authView=new SwaggerUi.Views.AuthButtonView({data:q,router:this.router,isOperation:!0,model:{scopes:q.scopes}}),this.$(".authorize-wrapper").append(this.authView.render().el)}return this.showSnippet(),this},parseHeadersType:function(e){var t={string:{"date-time":"dateTime",date:"date"}};return _.forEach(e,function(e){var n;e=e||{},n=t[e.type]&&t[e.type][e.format],_.isUndefined(n)||(e.type=n)}),e},contains:function(e,t){return e.filter(function(e){return e.indexOf(t)>-1?!0:void 0}).length},parseResponseHeaders:function(e){var t="; ",n=_.clone(e);return _.forEach(n,function(e){var n=[];_.forEach(e,function(e,t){var i=["type","description"];-1===i.indexOf(t.toLowerCase())&&n.push(t+": "+e)}),n.join(t),e.other=n}),n},addParameter:function(e,t){e.consumes=t,e.defaultRendering=this.model.defaultRendering,e.schema&&($.extend(!0,e.schema,this.model.definitions[e.type]),e.schema.definitions=this.model.definitions,e.schema.type||(e.schema.type="object"),e.schema.title||(e.schema.title=" "));var n=new SwaggerUi.Views.ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly,swaggerOptions:this.options.swaggerOptions});$(".operation-params",$(this.el)).append(n.render().el)},addStatusCode:function(e){e.defaultRendering=this.model.defaultRendering;var t=new SwaggerUi.Views.StatusCodeView({model:e,tagName:"tr",router:this.router});$(".operation-status",$(this.el)).append(t.render().el)},submitOperation:function(e){var t,n,i,r,a;if(null!==e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),n.find("textarea.required:visible").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1)}),n.find("select.required").each(function(){$(this).removeClass("error"),-1===this.selectedIndex&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),t){if(r=this.getInputMap(n),i=this.isFileUpload(n),a={parent:this},this.options.swaggerOptions)for(var o in this.options.swaggerOptions)a[o]=this.options.swaggerOptions[o];var s;for(s=0;s<this.model.parameters.length;s++){var l=this.model.parameters[s];if(l.jsonEditor&&l.jsonEditor.isEnabled()){var u=l.jsonEditor.getValue();r[l.name]=JSON.stringify(u)}}return a.responseContentType=$("div select[name=responseContentType]",$(this.el)).val(),a.requestContentType=$("div select[name=parameterContentType]",$(this.el)).val(),$(".response_throbber",$(this.el)).show(),i?($(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(this.invocationUrl),a.useJQuery=!0,r.parameterContentType="multipart/form-data",this.map=r,this.model.execute(r,a,this.showCompleteStatus,this.showErrorStatus,this)):(this.map=r,this.model.execute(r,a,this.showCompleteStatus,this.showErrorStatus,this))}},getInputMap:function(e){var t,n,i,r,a,o,s,l,u,c,p,h;for(t={},n=e.find("input"),i=0,r=n.length;r>i;i++)a=n[i],null!==a.value&&jQuery.trim(a.value).length>0&&(t[a.name]=a.value),"file"===a.type&&(t[a.name]=a.files[0]);for(o=e.find("textarea"),s=0,l=o.length;l>s;s++)a=o[s],u=this.getTextAreaValue(a),null!==u&&jQuery.trim(u).length>0&&(t[a.name]=u);for(c=e.find("select"),p=0,h=c.length;h>p;p++)a=c[p],u=this.getSelectedValue(a),null!==u&&jQuery.trim(u).length>0&&(t[a.name]=u);return t},isFileUpload:function(e){var t,n,i,r,a=!1;for(t=e.find("input"),n=0,i=t.length;i>n;n++)r=t[n],"file"===r.type&&(a=!0);return a},success:function(e,t){t.showCompleteStatus(e)},wrap:function(e){var t,n,i,r,a,o,s;for(i={},n=e.getAllResponseHeaders().split("\r"),a=0,o=n.length;o>a;a++)r=n[a],t=r.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(i[t[0].trim()]=t[1].trim());return s={},s.content={},s.content.data=e.responseText,s.headers=i,s.request={},s.request.url=this.invocationUrl,s.status=e.status,s},getSelectedValue:function(e){if(e.multiple){for(var t=[],n=0,i=e.options.length;i>n;n++){var r=e.options[n];r.selected&&t.push(r.value)}return t.length>0?t:null}return e.value},hideResponse:function(e){e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},showResponse:function(e){var t=JSON.stringify(e,null,"      ").replace(/\n/g,"<br>");$(".response_body",$(this.el)).html(_.escape(t))},showErrorStatus:function(e,t){t.showStatus(e)},showCompleteStatus:function(e,t){t.showStatus(e)},formatXml:function(e){var t,n,i,r,a,o,s,l,u,c,p,h,f;for(p=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(/\r\n/g,"\n").replace(p,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),c=0,i="",l=e.split("\n"),r=0,o="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,a,s,l,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(a in u)c=u[a],c&&e.push(a);return e}()[0],l=void 0===l?"other":l,t=o+"->"+l,o=l,s="",r+=h[t],s=function(){var e,t,i;for(i=[],n=e=0,t=r;t>=0?t>e:e>t;n=t>=0?++e:--e)i.push("  ");return i}().join(""),"opening->closing"===t?i=i.substr(0,i.length-1)+e+"\n":i+=s+e+"\n"},a=0,s=l.length;s>a;a++)u=l[a],n(u);return i},showStatus:function(e){var t,n;void 0===e.content?(n=e.data,t=e.url):(n=e.content.data,t=e.request.url);var i=e.headers;n=jQuery.trim(n);var r=null;i&&(r=i["Content-Type"]||i["content-type"],r&&(r=r.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml");var a,o,s=function(e){var t=document.createElement("audio");return!(!t.canPlayType||!t.canPlayType(e).replace(/no/,""))};if(n)if("application/json"===r||/\+json$/.test(r)){var l=null;try{l=JSON.stringify(JSON.parse(n),null,"  ")}catch(u){l="can't parse JSON.  Raw result:\n\n"+n}o=$("<code />").text(l),a=$('<pre class="json" />').append(o)}else if("application/xml"===r||/\+xml$/.test(r))o=$("<code />").text(this.formatXml(n)),a=$('<pre class="xml" />').append(o);else if("text/html"===r)o=$("<code />").html(_.escape(n)),a=$('<pre class="xml" />').append(o);else if(/text\/plain/.test(r))o=$("<code />").text(n),a=$('<pre class="plain" />').append(o);else if(/^image\//.test(r))a=$("<img>").attr("src",t);else if(/^audio\//.test(r)&&s(r))a=$("<audio controls>").append($("<source>").attr("src",t).attr("type",r));else if(i["Content-Disposition"]&&/attachment/.test(i["Content-Disposition"])||i["content-disposition"]&&/attachment/.test(i["content-disposition"])||i["Content-Description"]&&/File Transfer/.test(i["Content-Description"])||i["content-description"]&&/File Transfer/.test(i["content-description"]))if("Blob"in window){var c=r||"text/html",p=new Blob([n],{type:c}),h=document.createElement("a"),f=window.URL.createObjectURL(p),d=e.url.substr(e.url.lastIndexOf("/")+1),m=[c,d,f].join(":"),g=i["content-disposition"]||i["Content-Disposition"];if("undefined"!=typeof g){var y=/filename=([^;]*);?/.exec(g);null!==y&&y.length>1&&(m=y[1])}h.setAttribute("href",f),h.setAttribute("download",m),h.innerText="Download "+d,a=$("<div/>").append(h)}else a=$('<pre class="json" />').append("Download headers detected but your browser does not support downloading binary via XHR (Blob).");else i.location||i.Location?window.location=e.url:(o=$("<code />").text(n),a=$('<pre class="json" />').append(o));else o=$("<code />").text("no content"),a=$('<pre class="json" />').append(o);var v=a;$(".request_url",$(this.el)).html("<pre></pre>"),$(".request_url pre",$(this.el)).text(t),$(".response_code",$(this.el)).html("<pre>"+e.status+"</pre>"),$(".response_body",$(this.el)).html(v),$(".response_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(e.headers,null,"  ")).replace(/\n/g,"<br>")+"</pre>"),$(".response",$(this.el)).slideDown(),$(".response_hider",$(this.el)).show(),$(".response_throbber",$(this.el)).hide();var b=this.model.asCurl(this.map,{responseContentType:r});b=b.replace("!","&#33;"),$("div.curl",$(this.el)).html("<pre>"+_.escape(b)+"</pre>");var w=this.options.swaggerOptions;if(w.showRequestHeaders){var x=$(".sandbox",$(this.el)),A=this.getInputMap(x),O=this.model.getHeaderParams(A);delete O["Content-Type"],$(".request_headers",$(this.el)).html("<pre>"+_.escape(JSON.stringify(O,null,"  ")).replace(/\n/g,"<br>")+"</pre>")}var j=$(".response_body",$(this.el))[0];return w.highlightSizeThreshold&&"undefined"!=typeof e.data&&e.data.length>w.highlightSizeThreshold?j:hljs.highlightBlock(j)},toggleOperationContent:function(e){var t=$("#"+Docs.escapeResourceName(this.parentId+"_"+this.nickname+"_content"));t.is(":visible")?($.bbq.pushState("#/",2),e.preventDefault(),Docs.collapseOperation(t)):Docs.expandOperation(t)},getTextAreaValue:function(e){var t,n,i,r;if(null===e.value||0===jQuery.trim(e.value).length)return null;if(t=this.getParamByName(e.name),t&&t.type&&"array"===t.type.toLowerCase()){for(n=e.value.split("\n"),i=[],r=0;r<n.length;r++)null!==n[r]&&jQuery.trim(n[r]).length>0&&i.push(n[r]);return i.length>0?i:null}return e.value},showSnippet:function(){var e,t=this.$("[name=responseContentType]"),n=this.$(".operation-status .snippet_xml, .response-class .snippet_xml"),i=this.$(".operation-status .snippet_json, .response-class .snippet_json");t.length&&(e=t.val(),e.indexOf("xml")>-1?(n.show(),i.hide()):(i.show(),n.hide()))},getParamByName:function(e){var t;if(this.model.parameters)for(t=0;t<this.model.parameters.length;t++)if(this.model.parameters[t].name===e)return this.model.parameters[t];return null}}),SwaggerUi.Views.ParameterContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.parameterContentTypeId="pct"+Math.random(),$(this.el).html(Handlebars.templates.parameter_content_type(this.model)),this}}),SwaggerUi.Views.ParameterView=Backbone.View.extend({events:{"change [name=parameterContentType]":"toggleParameterSnippet"},initialize:function(){Handlebars.registerHelper("isArray",function(e,t){var n=e.type&&e.type.toLowerCase();return"array"===n||e.allowMultiple?t.fn(this):t.inverse(this)})},render:function(){var e,t,n=this.model.type||this.model.dataType,i=this.model.modelSignature.type,r=this.model.modelSignature.definitions,a=this.model.schema||{},o=this.model.consumes||[];if("undefined"==typeof n&&a.$ref){var s=a.$ref;n=0===s.indexOf("#/definitions/")?s.substring("#/definitions/".length):s}this.model.type=n,this.model.paramType=this.model["in"]||this.model.paramType,this.model.isBody="body"===this.model.paramType||"body"===this.model["in"],this.model.isFile=n&&"file"===n.toLowerCase(),"undefined"==typeof this.model["default"]&&(this.model["default"]=this.model.defaultValue),this.model.hasDefault="undefined"!=typeof this.model["default"],this.model.valueId="m"+this.model.name+Math.random(),this.model.allowableValues&&(this.model.isList=!0);var l=this.contains(o,"xml"),u=l?this.contains(o,"json"):!0;e=SwaggerUi.partials.signature.createParameterJSONSample(i,r);var c=this.template();$(this.el).html(c(this.model));var p={sampleJSON:u?e:!1,sampleXML:e&&l?SwaggerUi.partials.signature.createXMLSample("",a,r,!0):!1,isParam:!0,signature:SwaggerUi.partials.signature.getParameterModelSignature(i,r),defaultRendering:this.model.defaultRendering};e?(t=new SwaggerUi.Views.SignatureView({model:p,tagName:"div"}),$(".model-signature",$(this.el)).append(t.render().el)):$(".model-signature",$(this.el)).html(this.model.signature);var h=!1;if(this.options.swaggerOptions.jsonEditor&&this.model.isBody&&this.model.schema){var f=$(this.el);this.model.jsonEditor=new JSONEditor($(".editor_holder",f)[0],{schema:this.model.schema,startval:this.model["default"],ajax:!0,disable_properties:!0,disable_edit_json:!0,iconlib:"swagger"}),p.jsonEditor=this.model.jsonEditor,$(".body-textarea",f).hide(),$(".editor_holder",f).show(),$(".parameter-content-type",f).change(function(e){"application/xml"===e.target.value?($(".body-textarea",f).show(),$(".editor_holder",f).hide(),this.model.jsonEditor.disable()):($(".body-textarea",f).hide(),$(".editor_holder",f).show(),this.model.jsonEditor.enable())})}this.model.isBody&&(h=!0);var d={isParam:h};if(d.consumes=this.model.consumes,h){var m=new SwaggerUi.Views.ParameterContentTypeView({model:d});$(".parameter-content-type",$(this.el)).append(m.render().el),this.toggleParameterSnippet()}else{var g=new SwaggerUi.Views.ResponseContentTypeView({model:d});$(".response-content-type",$(this.el)).append(g.render().el),this.toggleResponseSnippet()}return this},contains:function(e,t){return e.filter(function(e){return e.indexOf(t)>-1?!0:void 0}).length},toggleParameterSnippet:function(){var e=this.$("[name=parameterContentType]").val();this.toggleSnippet(e)},toggleResponseSnippet:function(){var e=this.$("[name=responseContentType]");e.length&&this.toggleSnippet(e.val())},toggleSnippet:function(e){e=e||"",e.indexOf("xml")>-1?(this.$(".snippet_xml").show(),this.$(".snippet_json").hide()):(this.$(".snippet_json").show(),this.$(".snippet_xml").hide())},template:function(){return this.model.isList?Handlebars.templates.param_list:this.options.readOnly?this.model.required?Handlebars.templates.param_readonly_required:Handlebars.templates.param_readonly:this.model.required?Handlebars.templates.param_required:Handlebars.templates.param}}),SwaggerUi.partials.signature=function(){function e(e){var t,r=e.name,a=e.definition,o=e.config,s=e.models,l=e.config.isParam,u=[],c=a.properties,p=a.additionalProperties,h=a.xml,f=b(h);return f&&u.push(f),c||p?(c=c||{},t=_.map(c,function(e,t){var n,r;return l&&e.readOnly?"":(n=e.xml||{},r=i(t,e,s,o),n.attribute?(u.push(r),""):r)}).join(""),p&&(t+="<!-- additional elements allowed -->"),y(r,t,u)):n()}function t(e){return"<!-- Infinite loop $ref:"+e+" -->"}function n(e){return e=e?": "+e:"","<!-- invalid XML"+e+" -->"}function i(i,r,s,l){var u,c,p=_.isObject(r)?r.$ref:null;l=l||{},l.modelsToIgnore=l.modelsToIgnore||[];var h=_.isString(p)?a(p,i,s,l):o(i,r,s,l);if(!h)return n();switch(h.type){case"array":u=w(h);break;case"object":u=e(h);break;case"loop":u=t(h.name);break;default:u=A(h)}return p&&(c=l.modelsToIgnore.indexOf(p),c>-1&&l.modelsToIgnore.splice(c,1)),u}function r(e,t,n,i,r){if(arguments.length<4)throw new Error;this.config=r||{},this.config.modelsToIgnore=this.config.modelsToIgnore||[],this.name=v(e,n.xml),this.definition=n,this.models=i,this.type=t}function a(e,t,n,i){var a=u(e),o=n[a]||{},s=o.definition&&o.definition.type?o.definition.type:"object";return t=t||o.name,i.modelsToIgnore.indexOf(e)>-1?(s="loop",t=a):i.modelsToIgnore.push(e),o.definition?new r(t,s,o.definition,n,i):null}function o(e,t,n,i){var a=t.type||"object";return t?new r(e,a,t,n,i):null}function s(e,t,n,r){var a='<?xml version="1.0"?>';return p(a+i(e,t,n,{isParam:r}))}var l=function(e){return _.isPlainObject(e.schema)&&(e=l(e.schema)),e},u=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},c=function(e){if(/^Inline Model \d+$/.test(e)&&this.inlineModels){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},p=function(e){var t,n,i,r,a,o,s,l,u,c,p,h,f;for(p=/(>)(<)(\/*)/g,f=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(p,"$1\n$2$3").replace(f,"$1\n").replace(t,"$1\n$2"),c=0,i="",l=e.split("\n"),r=0,o="other",h={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,a,s,l,u,c;u={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},l=function(){var e;e=[];for(a in u)c=u[a],c&&e.push(a);return e}()[0],l=void 0===l?"other":l,t=o+"->"+l,o=l,s="",r+=h[t],s=function(){var e,t,i;for(i=[],n=e=0,t=r;t>=0?t>e:e>t;n=t>=0?++e:--e)i.push("  ");return i}().join(""),"opening->closing"===t?i=i.substr(0,i.length-1)+e+"\n":i+=s+e+"\n"},a=0,s=l.length;s>a;a++)u=l[a],n(u);return i},h=function(e,t,n,i){function r(e,t,i){var r,a=t;return e.$ref?(a=e.title||u(e.$ref),r=n[u(e.$ref)]):_.isUndefined(t)&&(a=e.title||"Inline Model "+ ++m,r={definition:e}),i!==!0&&(f[a]=_.isUndefined(r)?{}:r.definition),a}function a(e){var t='<span class="propType">',n=e.type||"object";return e.$ref?t+=r(e,u(e.$ref)):"object"===n?t+=_.isUndefined(e.properties)?"object":r(e):"array"===n?(t+="Array[",_.isArray(e.items)?t+=_.map(e.items,r).join(","):_.isPlainObject(e.items)?t+=_.isUndefined(e.items.$ref)?_.isUndefined(e.items.type)||-1!==_.indexOf(["array","object"],e.items.type)?r(e.items):e.items.type:r(e.items,u(e.items.$ref)):(console.log("Array type's 'items' schema is not an array or an object, cannot process"),t+="object"),t+="]"):t+=e.type,t+="</span>"}function o(e,t){var n="",i=e.type||"object",r="array"===i;switch(r&&(i=_.isPlainObject(e.items)&&!_.isUndefined(e.items.type)?e.items.type:"object"),_.isUndefined(e["default"])||(n+=h("Default",e["default"])),i){case"string":e.minLength&&(n+=h("Min. Length",e.minLength)),e.maxLength&&(n+=h("Max. Length",e.maxLength)),e.pattern&&(n+=h("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=h("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=h("Exclusive Min.","true")),e.maximum&&(n+=h("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=h("Exclusive Max.","true")),e.multipleOf&&(n+=h("Multiple Of",e.multipleOf))}if(r&&(e.minItems&&(n+=h("Min. Items",e.minItems)),e.maxItems&&(n+=h("Max. Items",e.maxItems)),e.uniqueItems&&(n+=h("Unique Items","true")),e.collectionFormat&&(n+=h("Coll. Format",e.collectionFormat))),_.isUndefined(e.items)&&_.isArray(e["enum"])){var a;a="number"===i||"integer"===i?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=h("Enum",a)}return n.length>0&&(t='<span class="propWrap">'+t+'<table class="optionsWrapper"><tr><th colspan="2">'+i+"</th></tr>"+n+"</table></span>"),t}function s(e,t){var s,h=e.type||"object",f="array"===e.type,m=c+t+" "+(f?"[":"{")+p;return t&&d.push(t),f?_.isArray(e.items)?m+="<div>"+_.map(e.items,function(e){var t=e.type||"object";return _.isUndefined(e.$ref)?_.indexOf(["array","object"],t)>-1?"object"===t&&_.isUndefined(e.properties)?"object":r(e):o(e,t):r(e,u(e.$ref))}).join(",</div><div>"):_.isPlainObject(e.items)?m+=_.isUndefined(e.items.$ref)?_.indexOf(["array","object"],e.items.type||"object")>-1?(_.isUndefined(e.items.type)||"object"===e.items.type)&&_.isUndefined(e.items.properties)?"<div>object</div>":"<div>"+r(e.items)+"</div>":"<div>"+o(e.items,e.items.type)+"</div>":"<div>"+r(e.items,u(e.items.$ref))+"</div>":(console.log("Array type's 'items' property is not an array or an object, cannot process"),m+="<div>object</div>"):e.$ref?m+="<div>"+r(e,t)+"</div>":"object"===h?(_.isPlainObject(e.properties)&&(s=_.map(e.properties,function(t,r){var s,c,p=_.indexOf(e.required,r)>=0,h=_.cloneDeep(t),f=p?"required":"",d='<span class="propName '+f+'">'+r+"</span> (";return h["default"]=i(h),h=l(h),c=t.description||h.description,_.isUndefined(h.$ref)||(s=n[u(h.$ref)],_.isUndefined(s)||-1!==_.indexOf([void 0,"array","object"],s.definition.type)||(h=l(s.definition))),d+=a(h),p||(d+=', <span class="propOptKey">optional</span>'),t.readOnly&&(d+=', <span class="propReadOnly">read only</span>'),d+=")",_.isUndefined(c)||(d+=': <span class="propDesc">'+c+"</span>"),h["enum"]&&(d+=' = <span class="propVals">[\''+h["enum"].join("', '")+"']</span>"),"<div"+(t.readOnly?' class="readOnly"':"")+">"+o(h,d)}).join(",</div>")),s&&(m+=s+"</div>")):m+="<div>"+o(e,h)+"</div>",m+c+(f?"]":"}")+p}var c='<span class="strong">',p="</span>",h=function(e,t){return'<tr><td class="optionName">'+e+":</td><td>"+t+"</td></tr>"};if(_.isObject(arguments[0])&&(e=void 0,t=arguments[0],n=arguments[1],i=arguments[2]),n=n||{},t=l(t),_.isEmpty(t))return c+"Empty"+p;if("string"==typeof t.$ref&&(e=u(t.$ref),t=n[e],"undefined"==typeof t))return c+e+" is not defined!"+p;"string"!=typeof e&&(e=t.title||"Inline Model"),t.definition&&(t=t.definition),"function"!=typeof i&&(i=function(e){return(e||{})["default"]});for(var f={},d=[],m=0,g=s(t,e);_.keys(f).length>0;)_.forEach(f,function(e,t){var n=_.indexOf(d,t)>-1;delete f[t],n||(d.push(t),g+="<br />"+s(e,t))});return g},f=function(e,t,n,i){e=l(e),"function"!=typeof i&&(i=function(e){return(e||{})["default"]}),n=n||{};var r,a,o=e.type||"object",s=e.format;return _.isUndefined(e.example)?_.isUndefined(e.items)&&_.isArray(e["enum"])&&(a=e["enum"][0]):a=e.example,_.isUndefined(a)&&(e.$ref?(r=t[u(e.$ref)],_.isUndefined(r)||(_.isUndefined(n[r.name])?(n[r.name]=r,a=f(r.definition,t,n,i),delete n[r.name]):a="array"===r.type?[]:{})):_.isUndefined(e["default"])?"string"===o?a="date-time"===s?(new Date).toISOString():"date"===s?(new Date).toISOString().split("T")[0]:"string":"integer"===o?a=0:"number"===o?a=0:"boolean"===o?a=!0:"object"===o?(a={},_.forEach(e.properties,function(e,r){var o=_.cloneDeep(e);o["default"]=i(e),a[r]=f(o,t,n,i)})):"array"===o&&(a=[],_.isArray(e.items)?_.forEach(e.items,function(e){a.push(f(e,t,n,i))}):_.isPlainObject(e.items)?a.push(f(e.items,t,n,i)):_.isUndefined(e.items)?a.push({}):console.log("Array type's 'items' property is not an array or an object, cannot process")):a=e["default"]),a},d=function(e,t){return t=t||{},t[e.name]=e,e.examples&&_.isPlainObject(e.examples)&&e.examples["application/json"]?(e.definition.example=e.examples["application/json"],_.isString(e.definition.example)&&(e.definition.example=jsyaml.safeLoad(e.definition.example))):e.definition.example||(e.definition.example=e.examples),f(e.definition,e.models,t,e.modelPropertyMacro)},m=function(e,t){var n,i;return e instanceof Array&&(i=!0,e=e[0]),"undefined"==typeof e?(e="undefined",n=!0):t[e]?(e=t[e],n=!1):c(e)?(e=c(e),n=!1):n=!0,n?i?"Array["+e+"]":e.toString():i?"Array["+h(e.name,e.definition,e.models,e.modelPropertyMacro)+"]":h(e.name,e.definition,e.models,e.modelPropertyMacro)},g=function(e,t){var n,i,r;if(t=t||{},n=e instanceof Array,r=n?e[0]:e,t[r]?i=d(t[r]):c(r)&&(i=d(c(r))),i){if(i=n?[i]:i,"string"==typeof i)return i;if(_.isObject(i)){var a=i;if(i instanceof Array&&i.length>0&&(a=i[0]),a.nodeName&&"Node"==typeof a){var o=(new XMLSerializer).serializeToString(a);return p(o)}return JSON.stringify(i,null,2)}return i}},y=function(e,t,i){var r,a;return i=i||[],a=i.map(function(e){return" "+e.name+'="'+e.value+'"'}).join(""),e?(r=["<",e,a,">",t,"</",e,">"],r.join("")):n("Node name is not provided")},v=function(e,t){var n=e||"";return t=t||{},t.name&&(n=t.name),t.prefix&&(n=t.prefix+":"+n),n},b=function(e){var t="",n="xmlns";return e=e||{},e.namespace?(t=e.namespace,e.prefix&&(n+=":"+e.prefix),{name:n,value:t}):t},w=function(e){var t,r=e.name,a=e.config,o=e.definition,s=e.models,l=o.items,u=o.xml||{};return l?(t=i(r,l,s,a),u=u||{},u.wrapped&&(t=y(r,t)),t):n()},x=function(e){var t,n;switch(e=e||{},n=e.items||{},t=e.type||""){case"object":return"Object is not a primitive";case"array":return"Array["+(n.format||n.type)+"]";default:return e.format||t}},A=function(e){var t,i=e.name,r=e.definition,a={string:{date:new Date(1).toISOString().split("T")[0],"date-time":new Date(1).toISOString(),"default":"string"},integer:{"default":1},number:{"default":1.1},"boolean":{"default":!0}},o=r.type,s=r.format,l=r.xml||{},u=b(l),c=[];return _.keys(a).indexOf(o)<0?n():(t=_.isArray(r["enum"])?r["enum"][0]:r.example||a[o][s]||a[o]["default"],l.attribute?{name:i,value:t}:(u&&c.push(u),y(i,t,c)))};return{getModelSignature:h,createJSONSample:d,getParameterModelSignature:m,createParameterJSONSample:g,createSchemaXML:i,createXMLSample:s,getPrimitiveSignature:x}}(),SwaggerUi.Views.PopupView=Backbone.View.extend({events:{"click .api-popup-cancel":"cancelClick"},template:Handlebars.templates.popup,className:"api-popup-dialog",selectors:{content:".api-popup-content",main:"#swagger-ui-container"},initialize:function(){this.$el.html(this.template(this.model))},render:function(){return this.$(this.selectors.content).append(this.model.content),$(this.selectors.main).first().append(this.el),this.showPopup(),this},showPopup:function(){this.$el.show()},cancelClick:function(){this.remove()}}),SwaggerUi.Views.ResourceView=Backbone.View.extend({initialize:function(e){e=e||{},this.router=e.router,this.auths=e.auths,""===this.model.description&&(this.model.description=null),this.model.description&&(this.model.summary=this.model.description)},render:function(){var e={};$(this.el).html(Handlebars.templates.resource(this.model));for(var t=0;t<this.model.operationsArray.length;t++){for(var n=this.model.operationsArray[t],i=0,r=n.nickname;"undefined"!=typeof e[r];)r=r+"_"+i,i+=1;e[r]=n,n.nickname=r,n.parentId=this.model.id,n.definitions=this.model.definitions,this.addOperation(n)}return $(".toggleEndpointList",this.el).click(this.callDocs.bind(this,"toggleEndpointListForResource")),$(".collapseResource",this.el).click(this.callDocs.bind(this,"collapseOperationsForResource")),$(".expandResource",this.el).click(this.callDocs.bind(this,"expandOperationsForResource")),this},addOperation:function(e){e.number=this.number;var t=new SwaggerUi.Views.OperationView({model:e,router:this.router,tagName:"li",className:"endpoint",swaggerOptions:this.options.swaggerOptions,auths:this.auths});$(".endpoints",$(this.el)).append(t.render().el),this.number++},callDocs:function(e,t){t.preventDefault(),Docs[e](t.currentTarget.getAttribute("data-id"))}}),SwaggerUi.Views.ResponseContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.responseContentTypeId="rct"+Math.random(),$(this.el).html(Handlebars.templates.response_content_type(this.model)),this}}),SwaggerUi.Views.SignatureView=Backbone.View.extend({events:{"click a.description-link":"switchToDescription","click a.snippet-link":"switchToSnippet","mousedown .snippet_json":"jsonSnippetMouseDown","mousedown .snippet_xml":"xmlSnippetMouseDown"},initialize:function(){},render:function(){return $(this.el).html(Handlebars.templates.signature(this.model)),"model"===this.model.defaultRendering?this.switchToDescription():this.switchToSnippet(),this},switchToDescription:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).hide(),$(".description",$(this.el)).show(),$(".description-link",$(this.el)).addClass("selected"),$(".snippet-link",$(this.el)).removeClass("selected")},switchToSnippet:function(e){e&&e.preventDefault(),$(".snippet",$(this.el)).show(),$(".description",$(this.el)).hide(),$(".snippet-link",$(this.el)).addClass("selected"),$(".description-link",$(this.el)).removeClass("selected")},snippetToTextArea:function(e){var t=$("textarea",$(this.el.parentNode.parentNode.parentNode));""!==$.trim(t.val())&&t.prop("placeholder")!==t.val()||(t.val(e),this.model.jsonEditor&&this.model.jsonEditor.isEnabled()&&this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON)))},jsonSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleJSON))},xmlSnippetMouseDown:function(e){this.model.isParam&&(e&&e.preventDefault(),this.snippetToTextArea(this.model.sampleXML))}}),SwaggerUi.Views.StatusCodeView=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e,t,n=this.router.api.models[this.model.responseModel];return $(this.el).html(Handlebars.templates.status_code(this.model)),e=this.router.api.models.hasOwnProperty(this.model.responseModel)?{sampleJSON:JSON.stringify(SwaggerUi.partials.signature.createJSONSample(n),void 0,2),sampleXML:this.model.isXML?SwaggerUi.partials.signature.createXMLSample("",this.model.schema,this.router.api.models):!1,isParam:!1,signature:SwaggerUi.partials.signature.getModelSignature(this.model.responseModel,n,this.router.api.models),defaultRendering:this.model.defaultRendering}:{signature:SwaggerUi.partials.signature.getPrimitiveSignature(this.model.schema)},t=new SwaggerUi.Views.SignatureView({model:e,tagName:"div"}),$(".model-signature",this.$el).append(t.render().el),this}})}).call(this);
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger.json b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger.json
new file mode 100644 (file)
index 0000000..8f3ca12
--- /dev/null
@@ -0,0 +1,161 @@
+{\r
+  "swagger" : "2.0",\r
+  "info" : {\r
+    "version" : "0.0.1-SNAPSHOT",\r
+    "title" : "vlantag-api Service"\r
+  },\r
+  "basePath" : "/vlantagapi",\r
+  "schemes" : [ "http", "https" ],\r
+  "paths" : {\r
+    "/v1/assign" : {\r
+      "post" : {\r
+        "operationId" : "assignVlanTag",\r
+        "consumes" : [ "application/json" ],\r
+        "produces" : [ "application/json" ],\r
+        "responses" : {\r
+          "200" : {\r
+            "description" : "successful operation",\r
+            "schema" : {\r
+              "$ref" : "#/definitions/AssignVlanTagResponse"\r
+            }\r
+          }\r
+        }\r
+      }\r
+    },\r
+    "/v1/ping/{name}" : {\r
+      "get" : {\r
+        "operationId" : "getPing",\r
+        "produces" : [ "application/json" ],\r
+        "parameters" : [ {\r
+          "name" : "name",\r
+          "in" : "path",\r
+          "required" : true,\r
+          "type" : "string"\r
+        } ],\r
+        "responses" : {\r
+          "200" : {\r
+            "description" : "successful operation",\r
+            "schema" : {\r
+              "$ref" : "#/definitions/PingResponse"\r
+            }\r
+          }\r
+        }\r
+      }\r
+    },\r
+    "/v1/unassign" : {\r
+      "post" : {\r
+        "operationId" : "unassignVlanTag",\r
+        "consumes" : [ "application/json" ],\r
+        "produces" : [ "application/json" ],\r
+        "responses" : {\r
+          "200" : {\r
+            "description" : "successful operation",\r
+            "schema" : {\r
+              "$ref" : "#/definitions/UnassignVlanTagResponse"\r
+            }\r
+          }\r
+        }\r
+      }\r
+    }\r
+  },\r
+  "definitions" : {\r
+    "AssignVlanTagResponse" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "output" : {\r
+          "type" : "array",\r
+          "items" : {\r
+            "$ref" : "#/definitions/AssignVlanTagResponseOutput"\r
+          }\r
+        },\r
+        "error-code" : {\r
+          "type" : "integer",\r
+          "format" : "int32"\r
+        },\r
+        "error-message" : {\r
+          "type" : "string"\r
+        }\r
+      }\r
+    },\r
+    "AssignVlanTagResponseOutput" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "resource-name" : {\r
+          "type" : "string"\r
+        },\r
+        "resource-value" : {\r
+          "type" : "string"\r
+        },\r
+        "resource-vlan-role" : {\r
+          "type" : "string"\r
+        },\r
+        "stored-elements" : {\r
+          "type" : "array",\r
+          "items" : {\r
+            "$ref" : "#/definitions/VlanTag"\r
+          }\r
+        }\r
+      }\r
+    },\r
+    "PingResponse" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "message" : {\r
+          "type" : "string"\r
+        }\r
+      }\r
+    },\r
+    "UnassignVlanTagResponse" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "output" : {\r
+          "type" : "array",\r
+          "items" : {\r
+            "$ref" : "#/definitions/UnassignVlanTagResponseOutput"\r
+          }\r
+        },\r
+        "error-code" : {\r
+          "type" : "integer",\r
+          "format" : "int32"\r
+        },\r
+        "error-message" : {\r
+          "type" : "string"\r
+        }\r
+      }\r
+    },\r
+    "UnassignVlanTagResponseOutput" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "vlan-type" : {\r
+          "type" : "string"\r
+        },\r
+        "key" : {\r
+          "type" : "string"\r
+        },\r
+        "vlantag-name" : {\r
+          "type" : "string"\r
+        }\r
+      }\r
+    },\r
+    "VlanTag" : {\r
+      "type" : "object",\r
+      "properties" : {\r
+        "vlan-uuid" : {\r
+          "type" : "string"\r
+        },\r
+        "vlantag-name" : {\r
+          "type" : "string"\r
+        },\r
+        "vlantag-value" : {\r
+          "type" : "string"\r
+        },\r
+        "element-vlan-role" : {\r
+          "type" : "string"\r
+        }\r
+      }\r
+    },\r
+    "VlantagApiService" : {\r
+      "type" : "object"\r
+    }\r
+  }\r
+}
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/application.properties b/ms/vlantag-api/src/main/resources/application.properties
new file mode 100644 (file)
index 0000000..1f17eda
--- /dev/null
@@ -0,0 +1,35 @@
+spring.datasource.url=jdbc:mysql://localhost:3306/sdnctl\r
+spring.datasource.username=sdnctl\r
+spring.datasource.password=sdnctl\r
+spring.datasource.driver-class-name=com.mysql.jdbc.Driver\r
+\r
+server.port=9091\r
+server.servlet.context-path=/\r
+server.servlet.path=/\r
+spring.jersey.application-path=/vlantagapi\r
+\r
+\r
+#userid:password~ROLE\r
+#admin:admin; sdnc:sdnc; user:user; actuator:admin\r
+application.authToken=YWRtaW46YWRtaW4=~ADMIN;c2RuYzpzZG5j~USER;dXNlcjp1c2Vy~USER;YWN0dWF0b3I6YWRtaW4=~ACTUATOR\r
+\r
+\r
+#logs\r
+logging.level.root=info\r
+logging.file=/opt/app/vlantagapi/logs/vlantagapi.log\r
+logging.pattern.console=%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr($ threadId: {PID:- }){magenta} %clr(---){faint} %clr([ hostname: %X{hostname} serviceName: %X{serviceName} version: %X{version} transactionId: %X{transactionId} requestTimeStamp: %X{requestTimestamp}  responseTimeStamp: %X{responseTimestamp} duration: %X{duration}]){yellow} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wex\r
+\r
+\r
+#ACTUATOR Endpoints\r
+info.app.name=VLANTAG Management Application\r
+info.app.description=This application provide apis to manage vlan tags for VNFs\r
+info.app.version=1.0.0\r
+\r
+#management.endpoints.web.exposure.include=*\r
+\r
+\r
+#PolicyManager Properties\r
+intf.pdp.policyengine.url=https://localhost:8081/pdp/api/getConfig\r
+intf.pdp.policyengine.http.headers.authorization=dGVzdHBkcDpTEyMw==\r
+intf.pdp.policyengine.http.headers.clientauth=cHl0anRlc3Q=\r
+intf.pdp.policyengine.http.headers.environment=TEST
\ No newline at end of file
diff --git a/ms/vlantag-api/src/main/resources/banner.txt b/ms/vlantag-api/src/main/resources/banner.txt
new file mode 100644 (file)
index 0000000..3248360
--- /dev/null
@@ -0,0 +1,11 @@
+\r
+\r
+ _   _ _       ___   _   _ _____ ___  _____        ___  ______ _____    ___  ____                      _____                 _          \r
+| | | | |     / _ \ | \ | |_   _/ _ \|  __ \      / _ \ | ___ \_   _|   |  \/  (_)                    /  ___|               (_)         \r
+| | | | |    / /_\ \|  \| | | |/ /_\ \ |  \/_____/ /_\ \| |_/ / | |     | .  . |_  ___ _ __ ___ ______\ `--.  ___ _ ____   ___  ___ ___ \r
+| | | | |    |  _  || . ` | | ||  _  | | _|______|  _  ||  __/  | |     | |\/| | |/ __| '__/ _ \______|`--. \/ _ \ '__\ \ / / |/ __/ _ \\r
+\ \_/ / |____| | | || |\  | | || | | | |_\ \     | | | || |    _| |_    | |  | | | (__| | | (_) |     /\__/ /  __/ |   \ V /| | (_|  __/\r
+ \___/\_____/\_| |_/\_| \_/ \_/\_| |_/\____/     \_| |_/\_|    \___/    \_|  |_/_|\___|_|  \___/      \____/ \___|_|    \_/ |_|\___\___|\r
+                                                                                                                                        \r
+                                                                                                                                        \r
+\r
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java
new file mode 100644 (file)
index 0000000..c4c9f35
--- /dev/null
@@ -0,0 +1,931 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+\r
+package org.onap.ccsdk.apps.ms.vlantagapi.core.service;\r
+\r
+import static org.mockito.ArgumentMatchers.any;\r
+import java.util.ArrayList;\r
+import java.util.List;\r
+\r
+import org.junit.Assert;\r
+import org.junit.Before;\r
+import org.junit.Rule;\r
+import org.junit.Test;\r
+import org.junit.rules.ExpectedException;\r
+import org.junit.runner.RunWith;\r
+import org.mockito.InjectMocks;\r
+import org.mockito.Mockito;\r
+import org.mockito.Spy;\r
+import org.mockito.junit.MockitoJUnitRunner;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.AllowedRanges;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.Elements;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyEngineResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.ResourceModel;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequestInput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequestInput;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.core.service.VlantagApiServiceImpl;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm.PolicyManagerClient;\r
+import org.onap.ccsdk.apps.ms.vlantagapi.util.MockResourceAllocator;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceResponse;\r
+import org.onap.ccsdk.sli.adaptors.util.str.StrUtil;\r
+\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+\r
+@RunWith(MockitoJUnitRunner.class)\r
+public class TestVlantagApiServiceImpl {\r
+private static final Logger log = LoggerFactory.getLogger(TestVlantagApiServiceImpl.class);\r
+       \r
+       VlantagApiServiceImpl service;\r
+       @InjectMocks\r
+       VlantagApiServiceImpl serviceSpy;\r
+       \r
+       @Spy\r
+       private PolicyManagerClient policyEngineSpy;\r
+       \r
+       @Spy\r
+       protected static MockResourceAllocator mockRA2;\r
+\r
+       \r
+       @Rule\r
+       public ExpectedException expectedEx = ExpectedException.none();\r
+       \r
+       @Before\r
+       public void setup() throws Exception {\r
+               service = new VlantagApiServiceImpl();\r
+\r
+               PolicyEngineResponse peResponse = new PolicyEngineResponse();\r
+               peResponse.setConfig("{\"riskLevel\":\"4\",\"riskType\":\"test\",\"policyName\":\"Internet_VlanTag_1810_US_VPE\",\"service\":\"vlantagResourceModel\",\"guard\":\"False\",\"description\":\"Internet_VlanTag_1810_US_VPE\",\"templateVersion\":\"1607\",\"priority\":\"4\",\"version\":\"20180709\",\"content\":{\"policy-instance-name\":\"Internet_VlanTag_1810_US_VPE\",\"resource-models\":[{\"data-store\":\"FALSE\",\"elements\":[{\"allowed-range\":[{\"min\":\"3553\",\"max\":\"3562\"}],\"recycle-vlantag-range\":\"TRUE\",\"overwrite\":\"FALSE\",\"vlantag-name\":\"VPE-Cust\"}],\"scope\":\"SITE\",\"vlan-type\":\"vlan-id-outer\",\"resource-resolution-recipe\":\"#BSB# VPE-Cust #ESB#\",\"resource-vlan-role\":\"outer-tag\"},{\"data-store\":\"TRUE\",\"elements\":[{\"allowed-range\":[{\"min\":\"3503\",\"max\":\"3503\"}],\"element-vlan-role\":\"outer-tag\",\"recycle-vlantag-range\":\"TRUE\",\"overwrite\":\"FALSE\",\"vlantag-name\":\"VPE-Cust-Outer\"},{\"allowed-range\":[{\"min\":\"4001\",\"max\":\"4012\"}],\"element-vlan-role\":\"outer-tag\",\"recycle-vlantag-range\":\"TRUE\",\"overwrite\":\"FALSE\",\"vlantag-name\":\"VPE-Core1\"},{\"allowed-range\":[{\"min\":\"4001\",\"max\":\"4012\"}],\"element-vlan-role\":\"outer-tag\",\"recycle-vlantag-range\":\"TRUE\",\"overwrite\":\"FALSE\",\"vlantag-name\":\"VPE-Core2\"}],\"scope\":\"SITE\",\"vlan-type\":\"vlan-id-filter\",\"resource-resolution-recipe\":\"#BSB# VPE-Cust-Outer, VPE-Core1, VPE-Core2 #ESB#\"}]}}");\r
+               PolicyEngineResponse[] peResponses = new PolicyEngineResponse[1];\r
+               peResponses[0] = peResponse;\r
+\r
+               Mockito.doReturn(peResponses).when(policyEngineSpy).getConfigUsingPost(any());\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_assign_sucess_001() throws Exception {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setScopeId("some-scope-id");\r
+               input.setKey("some-key");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               request.setInput(inputs);\r
+               \r
+               //PowerMockito.doReturn(mockStatus.Success).when(mockRA).reserve(any(), any(), any(), any());           \r
+               AssignVlanTagResponse response = serviceSpy.assignVlanTag(request);\r
+               \r
+               StrUtil.info(log, response);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_unassign_sucess_001() throws Exception {\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setKey("some-key");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               List<UnassignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               request.setInput(inputs);\r
+               \r
+               //Mockito.doReturn(AllocationStatus.Success).when(mockRA).release(any(), any());        \r
+\r
+               \r
+               UnassignVlanTagResponse response = serviceSpy.unassignVlanTag(request);\r
+               \r
+               StrUtil.info(log, response);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_ping_sucess_001() throws Exception {   \r
+               PingResponse response = serviceSpy.getPing("Vlantag API Service");\r
+               \r
+               StrUtil.info(log, response);\r
+               Assert.assertTrue(response.getMessage().contains("Ping response : Vlantag API Service Time : "));\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void test_resolveRecipe_001() {\r
+               \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, #BSB# VPE-Core2 #ESB#, VPE-Core3 #ESB#");\r
+               //model.setResourceResolutionRecipe("[ VPE-Core1, [ VPE-Core2 ], VPE-Core3 ]");\r
+               \r
+               List<ResourceResponse> rl = new ArrayList<>();\r
+               ResourceResponse response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core1";\r
+               response.resourceAllocated="3901";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core2";\r
+               response.resourceAllocated="3902";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core3";\r
+               response.resourceAllocated="3903";\r
+               \r
+               rl.add(response);\r
+               \r
+               service.resolveRecipe(model, rl);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_resolveResourceElementValue_001() throws VlantagApiException {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123, 123, 234 ]");\r
+               input.setScopeId("scope-id");\r
+               input.setVlanType("vlan-type");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               //model.setResourceResolutionRecipe("[ VPE-Core1, [ VPE-Core2 ], VPE-Core3 ]");\r
+               \r
+               List<ResourceResponse> rl = new ArrayList<>();\r
+               ResourceResponse response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core1";\r
+               response.resourceAllocated="3901";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core2";\r
+               response.resourceAllocated="3902";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core3";\r
+               response.resourceAllocated="3903";\r
+               \r
+               rl.add(response);\r
+               \r
+               String resourceValue = service.resolveResourceElementValue(input, model, element);\r
+               \r
+                Assert.assertTrue(resourceValue.equals("123"));\r
+       }\r
+       \r
+       @Test(expected = VlantagApiException.class)\r
+       public void test_resolveResourceElementValue_002() throws VlantagApiException {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+               input.setVlanType("vlan-type");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               //model.setResourceResolutionRecipe("[ VPE-Core1, [ VPE-Core2 ], VPE-Core3 ]");\r
+               \r
+               List<ResourceResponse> rl = new ArrayList<>();\r
+               ResourceResponse response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core1";\r
+               response.resourceAllocated="3901";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core2";\r
+               response.resourceAllocated="3902";\r
+               \r
+               rl.add(response);\r
+               \r
+               response = new ResourceResponse();\r
+               response.endPointPosition = "VPE-Core3";\r
+               response.resourceAllocated="3903";\r
+               \r
+               rl.add(response);\r
+               \r
+               service.resolveResourceElementValue(input, model, element);\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void test_validateElements_assign_vlantagName_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Vlantag Name missing for Element in Resource Model Policy for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123, 123, 234 ]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateElements_assign_allowedRanges_002() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Allowed Ranges missing for Element in Resource Model Policy for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123, 123, 234 ]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateElements_assign_vlantagElements_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Vlantag Elements found in Resource Model Policy for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123, 123, 234 ]");\r
+               input.setScopeId("scope-id");           \r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateElements_assign_Success_004() throws VlantagApiException {\r
+                       \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123, 123, 234 ]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateElements_unassign_vlantagName_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Vlantag Name missing for Element in Resource Model Policy for Vlan Type : vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateElements_unassign_vlantagElements_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Vlantag Elements found in Resource Model Policy for Vlan Type : vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateElements_unassign_Success_004() throws VlantagApiException {\r
+                       \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+               \r
+               service.validateElements(elements, input);\r
+\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_assign_resourceModel_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Matching Policy Resource Model found for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               service.validateModel(null, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_assign_resolutionRecipe_002() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Resource Resolution Recipe is null in Resource Model for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");           \r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_assign_scope_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Scope is null in Resource Model for Vlan Type : vlan-id-outer");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+\r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateModel_assign_success_004() throws VlantagApiException {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               model.setScope("VPE");\r
+               model.setElements(elements);\r
+       \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_unassign_resourceModel_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Matching Policy Resource Model found for Vlan Type : vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               service.validateModel(null, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_unassign_resolutionRecipe_002() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Resource Resolution Recipe is null in Resource Model for Vlan Type : vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");             \r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateModel_unassign_scope_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("Scope is null in Resource Model for Vlan Type : vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");             \r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateModel_unassign_success_004() throws VlantagApiException {\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance-name");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-inner");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               model.setScope("VPE");\r
+               model.setElements(elements);\r
+       \r
+               service.validateModel(model, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_request_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request is null.");\r
+               \r
+               AssignVlanTagRequest request = null;\r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_requestInput_002() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request Input is null or empty.");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_policyInstanceName_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request policy-instance-name is null.");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+               input.setVlanType("vlan-type");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_resourceName_004() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request vlan-type is null.");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setResourceValue("[ 123]");\r
+               input.setScopeId("scope-id");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_scopeId_005() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request scope-id is null.");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setResourceValue("[ 123]");\r
+               input.setVlanType("vlan-type");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_assign_resourceKey_006() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Assign Request key is null.");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setScopeId("scope-id");\r
+               input.setResourceValue("[ 123]");\r
+               input.setVlanType("vlan-type");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateRequest_assign_success_007() throws VlantagApiException {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               input.setScopeId("scope-id");\r
+               input.setResourceValue("[ 123]");\r
+               input.setVlanType("vlan-type");\r
+               input.setKey("some-key");\r
+               \r
+               AssignVlanTagRequest request = new AssignVlanTagRequest();\r
+               List<AssignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void test_validateRequest_unassign_request_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Unassign Request is null.");\r
+               \r
+               UnassignVlanTagRequest request = null;\r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_unassign_requestInput_002() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Unassign Request Input is null or empty.");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_unassign_policyInstanceName_003() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Unassign Request policy-instance-name is null.");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               List<UnassignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validateRequest_unassign_resourceName_004() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Unassign Request resource-name is null.");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               List<UnassignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       \r
+       @Test\r
+       public void test_validateRequest_unassign_resourceKey_005() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("VlanTag Unassign Request key is null.");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               List<UnassignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validateRequest_unassign_success_006() throws VlantagApiException {\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setKey("some-key");\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               UnassignVlanTagRequest request = new UnassignVlanTagRequest();\r
+               List<UnassignVlanTagRequestInput> inputs = new ArrayList<>();\r
+               inputs.add(input);\r
+               \r
+               request.setInput(inputs);\r
+               \r
+               service.validateRequest(request);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validate_assign_failure_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Resource Models available in Policy Manager for Policy Instance Name : some-policy-instance");\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               List<ResourceModel> resourceModels = new ArrayList<>();\r
+               \r
+               service.validate(resourceModels, input);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validate_assign_sucess_002() throws VlantagApiException {\r
+               \r
+               AssignVlanTagRequestInput input = new AssignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-outer");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               model.setScope("VPE");\r
+               model.setElements(elements);\r
+               \r
+               List<ResourceModel> resourceModels = new ArrayList<>();\r
+               resourceModels.add(model);\r
+               \r
+               \r
+               service.validate(resourceModels, input);\r
+       }\r
+       \r
+       @Test\r
+       public void test_validate_unassign_failure_001() throws VlantagApiException {\r
+               \r
+               expectedEx.expect(VlantagApiException.class);\r
+               expectedEx.expectMessage("No Resource Models available in Policy Manager for Policy Instance Name : some-policy-instance");\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               List<ResourceModel> resourceModels = new ArrayList<>();\r
+               \r
+               service.validate(resourceModels, input);\r
+       }\r
+       \r
+       @Test(expected = Test.None.class /* no exception expected */)\r
+       public void test_validate_unassign_sucess_002() throws VlantagApiException {\r
+               \r
+               UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput();\r
+               input.setPolicyInstanceName("some-policy-instance");\r
+               input.setVlanType("vlan-id-outer");\r
+               \r
+               Elements element = new Elements();\r
+               element.setElementVlanRole("element-vlan-role");\r
+               element.setOverwrite("FALSE");\r
+               element.setRecycleVlantagRange("TRUE");\r
+               element.setVlantagName("VPE-Core2");\r
+               \r
+               List<AllowedRanges> allowedRanges = new ArrayList<>();\r
+               AllowedRanges range = new AllowedRanges();\r
+               range.setMin("200");\r
+               range.setMax("300");\r
+               allowedRanges.add(range );\r
+               element.setAllowedRanges(allowedRanges);\r
+               \r
+               List<Elements> elements = new ArrayList<>();\r
+               elements.add(element);\r
+                       \r
+               ResourceModel model = new ResourceModel();\r
+               model.setVlanType("vlan-id-outer");\r
+               model.setResourceResolutionRecipe("#BSB# VPE-Core1, VPE-Core2, VPE-Core3 #ESB#");\r
+               model.setScope("VPE");\r
+               model.setElements(elements);\r
+               \r
+               List<ResourceModel> resourceModels = new ArrayList<>();\r
+               resourceModels.add(model);\r
+               \r
+               \r
+               service.validate(resourceModels, input);\r
+       }\r
+       \r
+          @Test(expected = VlantagApiException.class)\r
+           public void testGetPolicyFromPDPFailure() throws Exception {\r
+               Mockito.doThrow(new VlantagApiException()).when(policyEngineSpy).getConfigUsingPost(any());\r
+               policyEngineSpy.getPolicyFromPDP("sonme_random_policy_name");\r
+           }\r
+}\r
diff --git a/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/util/MockResourceAllocator.java b/ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/util/MockResourceAllocator.java
new file mode 100644 (file)
index 0000000..25ef60f
--- /dev/null
@@ -0,0 +1,50 @@
+/*******************************************************************************\r
+ * Copyright © 2017-2018 AT&T Intellectual Property.\r
+ * \r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ * \r
+ *     http://www.apache.org/licenses/LICENSE-2.0\r
+ * \r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ ******************************************************************************/\r
+\r
+package org.onap.ccsdk.apps.ms.vlantagapi.util;\r
+\r
+import java.util.List;\r
+\r
+import org.onap.ccsdk.sli.adaptors.ra.ResourceAllocator;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceEntity;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceRequest;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceResponse;\r
+import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceTarget;\r
+import org.onap.ccsdk.sli.adaptors.rm.data.AllocationStatus;\r
+import org.slf4j.Logger;\r
+import org.slf4j.LoggerFactory;\r
+\r
+public class MockResourceAllocator extends ResourceAllocator{\r
+       protected static final Logger logger = LoggerFactory.getLogger(MockResourceAllocator.class);\r
+       \r
+       public AllocationStatus reserve(ResourceEntity sd, ResourceTarget rt, ResourceRequest rr,\r
+            List<ResourceResponse> rsList) throws Exception {\r
+        \r
+               \r
+               ResourceResponse rres = new ResourceResponse();\r
+               rres.endPointPosition = "VPE-Core1";\r
+               rres.resourceAllocated = "2001";\r
+               rres.resourceName="vlan-id-outer";\r
+               \r
+               rsList.add(rres);\r
+               \r
+               return AllocationStatus.Success;\r
+    }\r
+       \r
+       public AllocationStatus release(ResourceEntity sd, ResourceRequest rr) throws Exception {\r
+        return AllocationStatus.Success;\r
+    }\r
+}\r